Skip to content

Instantly share code, notes, and snippets.

View ulhas's full-sized avatar
🚀
Done is better than perfect.

Ulhas ulhas

🚀
Done is better than perfect.
View GitHub Profile
@ulhas
ulhas / entrypoint.sh
Created April 11, 2017 04:45
Script to run when spinning up SailsJS container
#!/bin/bash
set -e
cmd="$@"
export REDIS_URL=redis://redis:6379
# the official postgres image uses 'postgres' as default user if not set explictly.
if [ -z "$POSTGRES_USER" ]; then
export POSTGRES_USER=postgres
fi
@ulhas
ulhas / Dockerfile
Created April 9, 2017 20:33
Docker file for SailsJS app
FROM node:latest
RUN npm install -g sails grunt npm-check-updates
COPY ./package.json /package.json
RUN npm install
RUN npm install --save sails-postgresql@beta
COPY ./compose/sails/entrypoint.sh /entrypoint.sh
RUN sed -i 's/\r//' /entrypoint.sh
@ulhas
ulhas / docker-compose.yml
Created April 9, 2017 20:32
Docker compose file for SailsJS app
version: '2'
volumes:
postgres_data_dev: {}
postgres_backup_dev: {}
services:
postgres:
build: ./compose/postgres
volumes:
@ulhas
ulhas / deploy_framework.rb
Created March 21, 2016 09:30
Fastlane - private lane for 'deploying framework'
desc "Deploy/upload framework"
private_lane :deploy_framework do |lane|
if !lane[:framework]
raise "No framework specified!".red
end
if !lane[:version]
raise "No version specified!".red
end
@ulhas
ulhas / increment_framework_version.rb
Created March 21, 2016 09:29
Fastlane - private lane for 'increment framework version'
desc "Increment framework version"
private_lane :increment_framework_version do |lane|
if !lane[:framework]
raise "No framework specified!".red
end
if !lane[:version]
raise "No version specified!".red
end
@ulhas
ulhas / package_framework.rb
Created March 21, 2016 09:28
Fastlane - private lane for 'package_framework`
desc "Zip and copy to right folder"
private_lane :package_framework do |lane|
if !lane[:framework]
raise "No framework specified!".red
end
if !lane[:version]
raise "No version specified!".red
end
@ulhas
ulhas / ht_helper.rb
Created March 20, 2016 03:27
Fastlane helper file for HyperTrack iOS
module Fastlane
module Helper
class HTHelper
attr_accessor :path
attr_accessor :ht_content
attr_accessor :version_regex
attr_accessor :version_match
attr_accessor :version_value
def initialize()
@ulhas
ulhas / build-universal-framework.sh
Created March 20, 2016 03:06
Script for building universal framework used in HyperTrack iOS SDK
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=../build/
# make the output directory and delete the framework directory
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
rm -rf "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework"
# Step 1. Build Device and Simulator versions
set -o pipefail && xctool -workspace "../${WORKSPACE_NAME}" -scheme "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | xcpretty
@ulhas
ulhas / ht_update_version_number.rb
Created March 20, 2016 03:02
Fastlane Action for updating version number of HyperTrack iOS SDK
require_relative "../helper/ht_helper"
module Fastlane
module Actions
module SharedValues
HT_UPDATE_VERSION_NUMBER_VALUE = :HT_UPDATE_VERSION_NUMBER_VALUE
end
class HtUpdateVersionNumberAction < Action
def self.run(params)
@ulhas
ulhas / ht_get_next_version_number.rb
Created March 20, 2016 03:01
Fastlane Action for getting next version for HyperTrack iOS SDK
require_relative "../helper/ht_helper"
module Fastlane
module Actions
module SharedValues
HT_UPDATE_VERSION_NUMBER_VALUE = :HT_UPDATE_VERSION_NUMBER_VALUE
end
class HtUpdateVersionNumberAction < Action
def self.run(params)