Skip to content

Instantly share code, notes, and snippets.

@code4cake
code4cake / react-native-circleCI-example-config.yml
Last active February 19, 2019 13:09 — forked from tjkang/config.yml
Use for inspiration
# Taking from this blogPost: https://medium.com/@tjkangs/travisci-circleci-2-0-with-fastlane-for-react-native-both-ios-and-android-3f99b71b8691
aliases:
# Cache Management
- &restore-yarn-cache
keys:
- yarn-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
# Fallback in case checksum fails
- yarn-{{ arch }}-{{ .Branch }}-
# Fallback in case this is a first-time run on a fork
@code4cake
code4cake / nodenv.sh
Created February 14, 2019 15:37 — forked from YasushiKobayashi/nodenv.sh
install nodejs with nodenv
#!/bin/sh
brew install nodenv yarn
nodenv install 6.7.0
nodenv rehash
nodenv global 6.7.0
echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(nodenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
@code4cake
code4cake / api.rb
Created December 23, 2015 20:41 — forked from kenmazaika/api.rb
require 'rubygems'
require 'httparty'
resp = HTTParty.get("http://www.catfact.info//api/v1/facts.json?page=1&per_page=30")
resp['facts'].each do |item|
puts item.inspect
end
@code4cake
code4cake / omniauth_callbacks_controller.rb
Last active October 3, 2015 08:33 — forked from gurix/omniauth_callbacks_controller.rb
Sign up via omniauth with diffferent locales(Taking from Devise WIKI)
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def twitter
handle_redirect('devise.twitter_uid', 'Twitter')
end
def facebook
handle_redirect('devise.facebook_data', 'Facebook')
end
private
@code4cake
code4cake / GMaps.js
Created August 31, 2015 08:14 — forked from hpneo/GMaps.js
GMaps.js
GMaps = function(options){
this.div = $(options.div)[0];
this.markers = [];
this.polygon = null;
this.infoWindow = null;
this.map = new google.maps.Map(this.div, {
zoom: 15,
center: new google.maps.LatLng(options.lat, options.lng),
mapTypeId: google.maps.MapTypeId.ROADMAP
});