This file contains 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
! CapsLock to Control_L | |
clear lock | |
clear control | |
keycode 66 = Control_L | |
add control = Control_L Control_R | |
! left Alt & right Alt | |
keycode 64 = Meta_L | |
keycode 108 = Meta_R |
This file contains 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 python3 | |
from __future__ import print_function | |
from netfilterqueue import NetfilterQueue | |
from scapy.layers.dns import * | |
def modify(pkt): | |
ip = IP(pkt.get_payload()) |
This file contains 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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'flazz/vim-colorschemes' | |
" Plugin 'jiangmiao/auto-pairs' | |
Plugin 'ctrlpvim/ctrlp.vim' |
This file contains 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 ruby | |
DEFAULT = %w(mongodb memcached) | |
RUNNING = `launchctl list | grep homebrew.mxcl`.split.select{|s|s.sub!(/\Ahomebrew\.mxcl\./, "")} | |
BREW_PATH = `brew --prefix`.chomp | |
AVAILABLE = Dir.new("#{BREW_PATH}/opt").select{|name|File.exists?("#{BREW_PATH}/opt/#{name}/homebrew.mxcl.#{name}.plist")} | |
def start(app) | |
if AVAILABLE.include? app |
This file contains 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
npm config set strict-ssl false |
This file contains 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
ifconfig eth0 | grep inet | grep -v inet6 | awk '{print $2}' | sed 's/.*://g' |
This file contains 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
-- e.g. replaceString("Hello hello", "hello", "Bye") --> "Hello Bye" | |
on replaceString(theText, oldString, newString) | |
-- ljr (http://applescript.bratis-lover.net/library/string/) | |
local ASTID, theText, oldString, newString, lst | |
set ASTID to AppleScript's text item delimiters | |
try | |
considering case | |
set AppleScript's text item delimiters to oldString | |
set lst to every text item of theText |