$ media [TAB] [TAB]
pause play skip volume
$ media play [TAB] [TAB]
itunes spotify
$ media pause [TAB] [TAB]
itunes spotify
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 argparse | |
from yaml import load, dump, add_representer | |
try: | |
from yaml import CDumper as Dumper | |
except ImportError: | |
from yaml import Dumper | |
def rep(dumper, data): | |
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style=None) |
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
augroup CrossHair | |
au! | |
au VimEnter * setlocal cursorline | |
au WinEnter * setlocal cursorline | |
au BufWinEnter * setlocal cursorline | |
au WinLeave * setlocal nocursorline | |
au VimEnter * setlocal cursorcolumn | |
au WinEnter * setlocal cursorcolumn | |
au BufWinEnter * setlocal cursorcolumn |
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 os = substitute(system('uname'), "\n", "", "") | |
if os == "Darwin" | |
vmap <C-c> y:call system("pbcopy", getreg("\""))<CR>:echo "copied to system clipboard"<CR> | |
nmap <C-v> :call setreg("\"", system("pbpaste"))<CR>p:echo ""<CR> | |
end |
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
class User < ActiveRecord::Base | |
define_index do | |
set_property enable_star: true | |
indexes :name | |
indexes :phone | |
indexes :address | |
end | |
def self.query(options) |
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
task :fix_precompile_hook do | |
module Fixassets | |
module Assets | |
extend ActiveSupport::Concern | |
included do | |
def dependency_fresh_with_path_fix?(environment, dep) | |
path = dep.pathname.to_s | |
return false unless environment.paths.find { |env_path| path.starts_with? env_path } | |
dependency_fresh_without_path_fix?(environment, dep) | |
end |
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
TARGET=lockscreen | |
all: clean compile | |
compile: | |
clang -framework Foundation -framework IOKit main.m -o ${TARGET} | |
clean: | |
rm -f ${TARGET} |
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
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U |
I hereby claim:
- I am kates on github.
- I am kates (https://keybase.io/kates) on keybase.
- I have a public key whose fingerprint is 4F22 399E A2EF AC24 2E69 B88E 9166 6DC5 BB54 2901
To claim this, I am signing this object:
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
use std::os; | |
use std::io; | |
use std::fmt; | |
struct Compiler { | |
source: String | |
//bytecode: String | |
} | |
enum Instruction { |