This file contains 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
# Original Gist by gcatlin/gist:1847248 | |
# | |
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew unlink FORMULA | |
brew install FORMULA | |
git checkout -- Library/Formula/FORMULA.rb # reset formula |
This file contains 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
# --------------------------------------------------------------------------- | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management | |
# 6. Networking | |
# 7. System Operations & Information |
This file contains 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
*.DS_Store | |
[Ll]ibrary/ | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild/ | |
#Un-ignore these specific files | |
!/Library/*.asset | |
!/Library/AssetImportState |
This file contains 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 | |
# This script resizes all the images it finds in a folder (and its subfolders) and resizes them | |
# The resized image is placed in the /resized folder which will reside in the same directory as the image | |
# | |
# Usage: > ./batch_resize.sh | |
initial_folder="/your/images/folder" # You can use "." to target the folder in which you are running the script for example | |
resized_folder_name="resized" | |
all_images=$(find -E $initial_folder -iregex ".*\.(jpg|gif|png|jpeg)") |
This file contains 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 | |
# Simple script to print out where your PATH variable is getting defined on for your OSX bash Terminal | |
# | |
echo -e "------------------------------------------------" | |
echo -e "------- ~/.bash_profile -------" | |
echo -e "------------------------------------------------" | |
cat ~/.bash_profile | grep PATH= | |
echo -e "" |
This file contains 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
# from https://github.com/docker/machine/issues/1826#issuecomment-143863060 | |
#if using boot2docker | |
#create file bootlocal.sh inside /var/lib/boot2docker; so it will persist and get executing when boot2docker images runs | |
##if target folder not present; create one | |
mkdir [target folder] | |
##mount the hostfolder; it should be shared with virtualbox already | |
##[hostfolder] is the folder name you gave when sharing the folder, not the path | |
sudo mount -t vboxsf -o uid=1000,gid=1000 [hostfolder] [target folder] |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ooo:color-table xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ooo="http://openoffice.org/2004/office"> | |
<draw:color draw:name="tb01" draw:color="#1f77b4"/> | |
<draw:color draw:name="tb02" draw:color="#aec7e8"/> | |
<draw:color draw:name="tb03" draw:color="#ff7f0e"/> | |
<draw:color draw:name="tb04" draw:color="#ffbb78"/> | |
<draw:color draw:name="tb05" draw:color="#2ca02c"/> | |
<draw:color draw:name="tb06" draw:color="#98df8a"/> | |
<draw:color draw:name="tb07" draw:color="#d62728"/> | |
<draw:color draw:name="tb08" draw:color="#ff9896"/> |
This file contains 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 | |
# In this case, it is installing an apk for every connected device, but could be any other ADB action | |
adb devices | awk 'FNR>1 {print $1}'| while read line ; do adb -s $line install the-app.apk ; done |
This file contains 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
using System.Collections.Generic; | |
using System.Linq; | |
static class EnumerableExtensions | |
{ | |
/// <summary> | |
/// Calculate the enumerable's mid-range https://en.wikipedia.org/wiki/Mid-range | |
/// </summary> | |
public static float MidRange(this IEnumerable<float> source) | |
{ |
This file contains 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
# Show Tasks | |
adb shell dumpsys activity activities | sed -En -e '/Stack #/p' -e '/Running activities/,/Run #0/p' |
OlderNewer