This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # recursively removes all .pyc files and __pycache__ directories in the current | |
| # directory | |
| find . | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################### | |
| # Version 1: using ‘apt-get install’ | |
| # Installs using apt-get | |
| # Requires update to npm afterwards | |
| # Harder to get latest copy of node | |
| # Requires sudo to use npm | |
| ############################################################################### | |
| # create new docker ubuntu container | |
| sudo docker run -i -t ubuntu /bin/bash # drops you into container as root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo Install all AppStore Apps at first! | |
| # no solution to automate AppStore installs | |
| read -p "Press any key to continue... " -n1 -s | |
| echo '\n' | |
| echo Install and Set San Francisco as System Font | |
| ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| #------------------------------------------------------------------------------- | |
| # NOTES: | |
| #------------------------------------------------------------------------------- | |
| # * User @jimklimov (and probably some others called out in the long comment | |
| # thread below) have modified this script to make it more robust and keep | |
| # up with various changes in the GitHub API and response format at: | |
| # https://github.com/jimklimov/github-scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.SignatureException; | |
| import java.util.Formatter; | |
| import javax.crypto.Mac; | |
| import javax.crypto.spec.SecretKeySpec; | |
| /** |
NewerOlder