Some of those are from this repo, many thanks! https://github.com/razzius/fish-functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# ytclip: Download and clip a portion of a YouTube video into MP4. | |
# | |
# Usage: | |
# ytclip <YOUTUBE_URL> --from <TIME> --to <TIME> | |
# | |
# <TIME> can be: | |
# - S (e.g. "75") | |
# - M:S (e.g. "2:38") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Rotating 4D Tesseract with Bouncing Ball</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let header = null | |
function getHeader () { | |
if (header !== null) { | |
createButton() | |
return | |
} else { | |
header = document.querySelector('header') | |
setTimeout(getHeader, 100) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system_profiler SPHardwareDataType | grep Serial | cut -d':' -f2 | sed 's/ //g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { $, argv, chalk } from 'zx' | |
import { io, read } from 'fsxx' | |
$.verbose = false | |
io.json.spaces = 4 | |
const lastTag = `${await $`git tag | sort -V | tail -n 1`}`.trim() | |
const { _: [, type] } = argv | |
if (type === undefined) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get list of applications from arguments | |
APPLICATIONS=$@ | |
# if no applications are specified, throw error | |
if [ -z "$APPLICATIONS" ]; then | |
echo "[error] No applications specified." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin support($size) { | |
@if $size == phone { | |
@media (max-width: 599px) { @content; } | |
} @else if $size == tablet-portrait { | |
@media (min-width: 600px) { @content; } | |
} @else if $size == tablet-landscape { | |
@media (min-width: 900px) { @content; } | |
} @else if $size == desktop { | |
@media (min-width: 1200px) { @content; } | |
} @else if $size == big-desktop { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file was initially generated by Windows Terminal 1.0.1811.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class Graph(): | |
def __init__(self, vertices): | |
self.vertices = vertices | |
self.graph = [[0 for column in range(vertices)] | |
for row in range(vertices)] | |
def list_distances(self, dist): | |
for node in range(self.vertices): |
NewerOlder