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
hs.window.animationDuration = 0 | |
units = { | |
left50 = { x = 0.00, y = 0.00, w = 0.50, h = 1.00 }, | |
left60 = { x = 0.00, y = 0.00, w = 0.60, h = 1.00 }, | |
left80 = { x = 0.00, y = 0.00, w = 0.80, h = 1.00 }, | |
right50 = { x = 0.50, y = 0.00, w = 0.50, h = 1.00 }, | |
right60 = { x = 0.40, y = 0.00, w = 0.60, h = 1.00 }, | |
right80 = { x = 0.20, y = 0.00, w = 0.80, h = 1.00 }, |
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 Const: | |
def __setattr__(self, name, value): | |
if name in self.__dict__: | |
raise TypeError("Can't rebind const (%s)" % name) | |
self.__dict__[name] = value | |
sys.modules[__name__] = Const() |
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 os | |
import tarfile | |
def recursive_files(dir_name='.', ignore=None): | |
for dir_name,subdirs,files in os.walk(dir_name): | |
if ignore and os.path.basename(dir_name) in ignore: | |
continue | |
for file_name in files: | |
if ignore and file_name in ignore: |
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
{ | |
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.timeZoneInformation)", | |
"value": [ | |
{ | |
"alias": "Dateline Standard Time", | |
"displayName": "(UTC-12:00) International Date Line West" | |
}, | |
{ | |
"alias": "Samoa Standard Time", | |
"displayName": "(UTC+13:00) Samoa" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
while read local_ref local_sha1 remote_ref remote_sha1 | |
do | |
if [[ "${remote_ref##refs/heads/}" = "origin/master" ]]; then | |
echo -n "Do you want to push to ${remote_ref} ${remote_sha1}? (y/n) : " | |
exec < /dev/tty | |
read answer | |
case $answer in | |
y) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function ssh-fzf () { | |
local selected_host=$(grep "Host " ~/.ssh/config | grep -v '*' | cut -b 6- | fzf --query "$LBUFFER") | |
if [ -n "$selected_host" ]; then | |
BUFFER="ssh ${selected_host}" | |
zle accept-line | |
fi | |
zle reset-prompt | |
} |
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
function ghq-fzf() { | |
local selected_dir=$(ghq list | fzf --query="$LBUFFER") | |
if [ -n "$selected_dir" ]; then | |
BUFFER="cd $(ghq root)/${selected_dir}" | |
zle accept-line | |
fi | |
zle reset-prompt | |
} |
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
function history-fzf() { | |
local tac | |
if which tac > /dev/null; then | |
tac="tac" | |
else | |
tac="tail -r" | |
fi | |
BUFFER=$(history -n 1 | eval $tac | fzf --query "$LBUFFER") |
NewerOlder