A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| @Override | |
| public void onStart() { | |
| super.onStart(); | |
| Branch branch = Branch.getInstance(); | |
| branch.initSession(new Branch.BranchReferralInitListener() { | |
| @Override | |
| public void onInitFinished(JSONObject referringParams, BranchError error) { | |
| if (error == null) { | |
| // params are the deep linked params associated with the link that the user clicked -> was re-directed to this app |
| public void downloadUpdate() { | |
| DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); | |
| String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/"; | |
| String fileName = "your_app.apk"; | |
| destination += fileName; | |
| final Uri uri = Uri.parse("file://" + destination); | |
| File file = new File(destination); | |
| if (file.exists()) | |
| file.delete(); |
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 14, | |
| // font family with optional fallbacks | |
| fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
| // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
| cursorColor: 'rgba(248,28,229,0.75)', |
| 1. Fork the project | |
| 2. git clone <your-forked-repo> | |
| 3. Add a new remote of the original repo | |
| 4. Pull changes from original repo frequently and rebase against your local | |
| 5. Push changes to your repo | |
| 6. Create pull create and send it to the original repo! |
| # Inspired from https://gist.github.com/selvakn/358558 | |
| export HISTORYFILESIZE=10000 | |
| export PS_COLOR="0;32" | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
| } |
| "(hey there!)".gsub(/^\(|\)$/,'') |
| select ObjectColumnName from dbc.dbqlobjtbl a | |
| join dbc.dbqlogtbl b on a.ProcID = b.ProcID | |
| and a.QueryID = b.QueryID | |
| where ObjectDatabaseName = 'database_name' and ObjectTableName = 'table_name' and statementtype = 'Select' and ObjectType = 'Col' |
| cd git-repo-dir | |
| mkdir repo-name | |
| cd repo-name | |
| git init --bare | |
| cd .. | |
| chown -R gituser:gituser repo-name | |
| /** In Git GUI, add a remote repo with URL as **/ |
| Public Function convertNumberToWordsForIndia9Digits(ByVal number As Decimal) | |
| 'Based on this - http://www.php.net/manual/en/function.number-format.php#108532 | |
| 'If you know the C# version, share it here http://blog.emaillenin.com | |
| Dim words As New Hashtable | |
| words.Add("0", "") | |
| words.Add("1", "One") | |
| words.Add("2", "Two") | |
| words.Add("3", "Three") | |
| words.Add("4", "Four") | |
| words.Add("5", "Five") |