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
#register this with ELB | |
# what is my name | |
myname=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
# what is my AvailabilityZone | |
myaz=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone) | |
#What is my region | |
myregion=${myaz%?} |
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 | |
# Auto Increment Version Script | |
# Make sure you have or create CFBuildNumber and CFBuildVersion in your info.plist | |
buildPlist="FlowHealth/FlowHealth-Info.plist" | |
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBuildVersion" $buildPlist) | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist) | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBuildNumber $buildNumber" $buildPlist | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildVersion.$buildNumber" $buildPlist |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type Book struct { | |
Title string `json:"title,omitempty"` | |
Author string `json:"author,omitempty"` |
This file has been truncated, but you can view the full file.
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
brew install -v gcc 2>&1 | |
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2 | |
Already downloaded: /Library/Caches/Homebrew/gcc-4.9.1.tar.bz2 | |
==> Verifying gcc-4.9.1.tar.bz2 checksum | |
tar xf /Library/Caches/Homebrew/gcc-4.9.1.tar.bz2 | |
==> Patching | |
==> ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc/4.9.1_1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc 4.9.1_1 --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib | |
checking build system type... x86_64-apple-darwin14.0.0 | |
checking host system type... x86_64-apple-darwin14.0.0 | |
checking target sys |
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
var window: UIWindow? | |
var sideMenuViewController: RESideMenu? | |
var rootTabVC: UITabBarController? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// about | |
var about : AboutViewController = AboutViewController(nibName: "AboutView_iphone", bundle: nil) | |
about.title = "About" |
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
#!/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 | |
# |
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
function loadWithPrefix(matFileName, prefix) | |
load(matFileName) | |
allVariables = who; | |
for i = 1:length(allVariables) | |
if (strcmp(allVariables{i}, 'prefix') || strcmp(allVariables{i}, 'matFileName')) | |
% | |
else | |
disp([allVariables{i} ' -> ' prefix allVariables{i}]); | |
eval(['assignin(''base'', [prefix allVariables{i}] ,' allVariables{i} ');']); | |
end |
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
<html> | |
<body> | |
<script> | |
alert('ali here'); | |
function showResults(a) | |
{ | |
for(var key in a['data']) | |
{ | |
if (a['data'].hasOwnProperty(key)) { // this will check if key is owned by data object and not by any of it's ancestors | |
alert(key+': '+a['data'][key]); // this will show each key with it's value |
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
[color] | |
ui = true | |
[alias] | |
lol = log --pretty=oneline --abbrev-commit --graph --decorate | |
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short | |
dw = diff --word-diff | |
sb = status -sb | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C( bold blue)<%an>%Creset' --abbrev-comm it -- | |
lp = log -p | |
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/sh | |
#read more at http://alimoeenysbrain.blogspot.com/2013/10/automatic-versioning-with-git-commit.html | |
#replace all MYPROJECT with your project name | |
#for languages other than matlab replace all the .go extensions with your language extensions and modify BODY to reflect you language syntax | |
#for go (golang) see this gits: https://gist.github.com/alimoeeny/7005725 | |
VERBASE=$(git rev-parse --verify HEAD | cut -c 1-7) | |
echo $VERBASE | |
NUMVER=$(awk '{printf("%s", $0); next}' MYPROJECTversion.m | sed 's/.*MYPROJECT\.//' | sed 's/\..*//') |
OlderNewer