Skip to content

Instantly share code, notes, and snippets.

View madhikarma's full-sized avatar

Shagun Madhikarmi madhikarma

View GitHub Profile
@madhikarma
madhikarma / Git cheatsheet
Last active April 28, 2016 08:17
Git cheatsheet
#### Clone
git clone <some_repo_url>
#### Branch
git branch <branch_name>
#### Checkout
git checkout <branch_name>
#### Commit
@madhikarma
madhikarma / hockey_build_script.sh
Last active August 29, 2015 14:27
Hockey Build Script
#!/bin/sh
set -eo pipefail
IFS=$'\n\t'
NOW=$(date +%s)
RELEASE_NOTES=""
BUILD_FILE_NAME="Project-${NOW}" # put file name here
API_TOKEN="TODO" # put API token here
PROVISIONING_PROFILE_IDENTITY="Some Distribution Profile"
@madhikarma
madhikarma / build_framework.sh
Created October 13, 2015 12:26
Script to build a framework for multiple architectures
# Merge Script
# http://code.hootsuite.com/an-introduction-to-creating-and-distributing-embedded-frameworks-in-ios/
# 1
# Set bash script to exit immediately if any commands fail.
set -e
# 2
# Setup some constants for use later on.
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
@madhikarma
madhikarma / build.sh
Last active June 8, 2020 08:33
xcodebuild script
#!/bin/sh
set -eo pipefail
IFS=$'\n\t'
# Constants
NOW=$(date +%s)
BUILD_FILE_NAME="MyApp-${NOW}"
SCHEME="MyApp"
WORKSPACE="MyApp"
PROJECT="MyApp"
@madhikarma
madhikarma / setup_ruby_fastlane.sh
Created December 28, 2016 14:44
Ruby setup for using Fastlane
brew update && brew upgrade openssl
rvm osx-ssl-certs update all
rvm reinstall ruby-2.2.3 --with-openssl-dir=/usr/local
@madhikarma
madhikarma / gist:3cda4b641a83071a7d008021f5bdb97e
Created January 17, 2017 18:07
Hockey app upload script
# dSYMs
# part 1
ZIPPED_DSYM="${BUILD_FILE_NAME}.dSYM.zip"
cd "${BUILD_FILE_NAME}.xcarchive/"
zip -r "../$ZIPPED_DSYM" "dSYMs/"
cd ..
# Deploy
@madhikarma
madhikarma / request.rb
Last active January 22, 2017 14:42
Ruby HTTP request
# To use save this file, open a terminal at its location and execute `ruby request.rb`
require 'net/http'
require 'json'
url = "https://api.spotify.com/v1/search?type=artist&q=bonobo"
uri = URI(url)
request = Net::HTTP::Get.new(uri)
request["MyCustomHeader"] = "abcde"
@madhikarma
madhikarma / sample_login_api_response.json
Created May 6, 2017 09:44
sample_login_api_response.json
{
"token": "c3fcd3d76192e4007dfb496cca67e13b"
}
@madhikarma
madhikarma / android-setup.sh
Created January 2, 2018 07:46
Android setup notes
export ANDROID_HOME=/YOUR_PATH_TO/android-sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH