Skip to content

Instantly share code, notes, and snippets.

@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
});
require 'net/http'
require 'net/https'
require 'uri'
unless defined?(ActiveSupport::JSON)
begin
require 'rubygems' # for Ruby 1.8
require 'json'
rescue LoadError
raise LoadError, "Please install the 'json' or 'json_pure' gem to parse geocoder results."
@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 / Error_messages.md
Last active October 25, 2015 13:20
Fritkots.json(StackOverFlow)

Error: Unable to upload map 14/10: FIXED

map.self-9bdba3cb475f02d6f8f5758062991fd11b74cc98f433f22aee3dac332a22ac72.js:19 Uncaught SyntaxError: Unexpected token )

Error: Unable to see data/markers on map 18/10:

  1. Error on opening page
  • Just get the error message 'Oops something went wrong'

console.log(geojson);

Uncaught Error: Invalid GeoJSON object.o.extend.geometryToLayer 
@ leaflet-src.js:6201L.FeatureGroup.extend._initialize 
@ feature_layer.js:94L.FeatureGroup.extend.setGeoJSON
@ feature_layer.js:37L.FeatureGroup.extend.initialize 
@ feature_layer.js:30e @ leaflet-src.js:229module.exports.featureLayer 
@ feature_layer.js:126$.getJSON.success 
@ map.self-a6df45bfe8ed75544f6475a8fe8e82cb2da5ee507eee0fd907eb593f7bdd6f7b.js?body=1:24add 
@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 / 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

Keybase proof

I hereby claim:

  • I am dantesolis on github.
  • I am intercoder (https://keybase.io/intercoder) on keybase.
  • I have a public key ASDool9JwcPeRQWpWmDuphUKAcxIyN0ns45e5zV15hWfJQo

To claim this, I am signing this object:

@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