- Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"- Install prerequisites
brew install git hgbrew install osxfuse(see Mac issues to troubleshoot common errors)- Install Go
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
| private static final int PICK_PHOTO_FOR_AVATAR = 0; | |
| public void pickImage() { | |
| Intent intent = new Intent(Intent.ACTION_GET_CONTENT); | |
| intent.setType("image/*"); | |
| startActivityForResult(intent, PICK_PHOTO_FOR_AVATAR); | |
| } | |
| @Override | |
| public void onActivityResult(int requestCode, int resultCode, Intent data) { |
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
| cd /tmp | |
| pwd | |
| #Download Android SDK from Google and unzip it | |
| wget http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | |
| tar zxvf android-sdk_r24.1.2-linux.tgz | |
| rm android-sdk_r24.1.2-linux.tgz | |
| #Set extracted SDK location to $PATH so we can use commands | |
| export ANDROID_HOME="/tmp/android-sdk-linux" | |
| export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" |
Moved to git-repository: https://github.com/denji/awesome-http-benchmark
Located in alphabetical order (not prefer)
- ab – slow and single threaded, written in
C - apib – most of the features of ApacheBench (
ab), also designed as a more modern replacement, written inC - autocannon – fast HTTP/1.1 benchmarking tool written in Node.js
- baloo – Expressive end-to-end HTTP API testing made easy, written in Go (
golang)
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
| // additional required configuration to hook into the build script | |
| android { | |
| signingConfigs { | |
| release | |
| } | |
| buildTypes { | |
| release { | |
| signingConfig signingConfigs.release | |
| } |
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 |
Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.
First install motion:
~> sudo apt-get install motion
Then create a config file:
~> mkdir ~/.motion
~> nano ~/.motion/motion.conf
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 | |
| # Script to backup git repo to S3 | |
| # Set bucket, dir, password and account to use for the backup. I keep mine in local env vars | |
| # These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
| bucket=$GITHUB_BACKUP_BUCKET | |
| dir=$GITHUB_BACKUP_DIR | |
| password=$GITHUB_BACKUP_PASSWORD | |
| account=$GITHUB_ACCOUNT |

