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
| #!/usr/bin/env ruby | |
| # Copies missing Info.plist files for a .app's Qt frameworks installed | |
| # from macdeployqt. Without the plists, 'codesign' fails on 10.9 with | |
| # "bundle format unrecognized, invalid, or unsuitable". | |
| # | |
| # Example usage: | |
| # ruby macdeployqt_fix_frameworks.rb /Users/me/Qt5.2.0/5.2.0/clang_64/ MyProgram.app | |
| # | |
| # Links: |
| # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
| # that enables you to choose a character from a menu of options. If you are on Lion | |
| # try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
| # for input. | |
| # | |
| # It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
| # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
| # as it means you cannot press and hold h/j/k/l to move through your file. You have | |
| # to repeatedly press the keys to navigate. |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| public class RandomSort { | |
| public RandomSort(int[] i) { | |
| int counter = 0; | |
| System.out.println("I'll sort " + i.length + " elements..."); | |
| while (!isSorted(i)) { | |
| shuffle(i); | |
| counter++; | |
| } | |
| System.out.println("Solution found! (shuffled " + counter + " times)"); |