A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
#!/usr/bin/python | |
import sys | |
import getopt | |
def main(argv): | |
inputfile = '' | |
outputfile = '' | |
try: | |
opts, args = getopt.getopt(argv, "hi:o:", ["ifile=", "ofile="]) |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
package com.google.firebase.zerotoapp; | |
public class ChatMessage { | |
public String name; | |
public String message; | |
public ChatMessage() { | |
} | |
public ChatMessage(String name, String message) { |
require 'json' | |
require 'openssl' | |
task :test do | |
progress = 'Progress [' | |
count = 1 | |
total = SomeModel.count | |
SomeModel.all.each do |m| | |
m.do_something | |
count = count + 1 |
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > | |
<corners | |
android:topLeftRadius="100dp" | |
android:topRightRadius="100dp" | |
android:bottomLeftRadius="100dp" | |
android:bottomRightRadius="100dp" | |
/> | |
<solid | |
android:color="#9c0004" | |
/> |
import android.content.Context; | |
import android.os.Handler; | |
import android.widget.Toast; | |
/* | |
Taken from an answer in the following thread | |
http://stackoverflow.com/questions/7378936/how-to-show-toast-message-from-background-thread | |
From user kaolick |
#!/bin/sh | |
#makes checksums for all files in a given dir | |
echo "making a md5 for all files in dir = $1" | |
rm $1/*.md5 | |
for f in $1/* | |
do | |
echo "processing $f" | |
md5 $f > $f.md5 | |
done | |
#get rid of the script md5's |
alias ts="tig status" | |
alias gsereset="dropdb gse_backend_development & heroku pg:pull HEROKU_POSTGRESQL_JADE gse_backend_development -a gse-mobile-api" | |
alias reds="redis-server" | |
alias ..="cd .." | |
alias ....="cd ../.." | |
alias ......="cd ../../.." | |
alias ........="cd ../../../.." | |
alias ..........="cd ../../../../.." | |
alias webdev="cd ~/Documents/websites/" | |
alias droiddev="cd ~/Docments/android/" |
function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; } |