Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
@Superbil
Superbil / Navy_Fleet.py
Last active December 13, 2015 23:28
find ship by Navy Fleet
#!/usr/bin/env ipython
# author: superbil
# define values
map_size = 7
small_limit = 3
middle_limit = 2
bigger_limit = 1
# create map
#!/usr/bin/env python
import os, os.path
import glob
import shutil
def build(target, output_dir):
"builds tracker for device or simulator"
t = target.lower()
@Superbil
Superbil / dict.py
Last active March 10, 2016 09:38
lookup word on Mac's Dictionary in Emacs
#!/usr/bin/env python
'''
must intall PyObjC, pyobjc-framework-DictionaryServices
source from http://sakito.jp/mac/dictionary.html
'''
import sys
from DictionaryServices import *
@Superbil
Superbil / init-gnus.el
Created February 22, 2013 13:44
Gmail for gnus in emacs
;; You need this to be able to list all labels in gmail
(setq gnus-ignored-newsgroups "")
;; And this to configure gmail imap
(add-to-list 'gnus-secondary-select-methods '(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)))
(provide 'init-gnus)
@Superbil
Superbil / .zshrc
Last active December 14, 2015 02:39
my zshrc for oh-my-zsh
#!/usr/bin/env zsh
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
if [[ -z "$INSIDE_EMACS" ]]; then
# normal term
ZSH_THEME="gentoo"
else
# inside Emacs
ZSH_THEME="dpoggi"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Org Capture
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Capture templates for: TODO tasks, Notes, appointments, phone calls, and org-protocol
(setq org-capture-templates
(quote (("t" "todo" entry (file "~/org/refile.org")
"* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)
("r" "respond" entry (file "~/org/refile.org")
"* TODO Respond to %:from on %:subject\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t)
("n" "note" entry (file "~/org/refile.org")
# Use jdb to debug Android application
# Run ddms and select application to forward port.
ddms
# Execute jdb and attach to the listening application
# ddms show 8600 / 8700
jdb -attach localhost:8600
# Or in windows, need to specify connector explicitly
aspell --with-lang-en
autoconf
automake
bazaar
bdw-gc
bitlbee
brew-gem
c-ares
cabextract
cloc
@Superbil
Superbil / init-dictionary.el
Created March 8, 2013 03:18
lookup dictionary in emacs on mac
;; from http://larkery.tumblr.com/post/465585528/emacs-dictionary-app
(defun mac-open-dictionary (the-word)
"Open Dictionary.app for the-word"
(interactive "Dictionary Lookup: ")
(shell-command
(concat "open \"dict:///" (replace-regexp-in-string "\"" "\\\\\"" the-word) "\"")))
;; see https://gist.github.com/1228110
;; dict.py is from http://sakito.jp/mac/dictionary.html
(defun dictionary ()
@Superbil
Superbil / ios-library.sh
Last active May 19, 2017 10:19
build google protobuf iOS version
export SDKVER="6.1"
configure_for_platform() {
export PLATFORM=$1
export ARCHITECTURE=$2
echo "Platform is $PLATFORM"
if [ "$PLATFORM" == "iPhoneSimulator" ]; then
export ARCH=i686-apple-darwin10
fi