Skip to content

Instantly share code, notes, and snippets.

View t-a-b-l-e's full-sized avatar

Table t-a-b-l-e

View GitHub Profile
@gnachman
gnachman / iterm.scpt
Last active April 27, 2018 05:44
Fix docker quickstart terminal for iTerm2 version 2.9 and later
on write_to_file(this_data, target_file, append_data)
try
set the target_file to the target_file as string
set the open_target_file to open for access file target_file with write permission
if append_data is false then set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
return true
on error
try
@nibocn
nibocn / Cygwin右键菜单.md
Last active January 10, 2025 07:32
Windows中添加Cygwin的右键菜单

在注册表中创建信息

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Open Cygwin]
"Icon"="D:\\Software\\cygwin64\\Cygwin.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Open Cygwin\Command]
@="D:\\Software\\cygwin64\\bin\\mintty.exe -i /Cygwin-Terminal.ico /bin/env _T=\"%V\" /bin/zsh -l"
@xuecan
xuecan / des3.py
Created October 30, 2013 10:29
using PyCrypto for 3DES
from Crypto.Cipher import DES3
def _make_des3_encryptor(key, iv):
encryptor = DES3.new(key, DES3.MODE_CBC, iv)
return encryptor
def des3_encrypt(key, iv, data):
encryptor = _make_des3_encryptor(key, iv)
pad_len = 8 - len(data) % 8 # length of padding
@artero
artero / launch_sublime_from_terminal.markdown
Last active March 10, 2026 11:29 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation