Skip to content

Instantly share code, notes, and snippets.

View whyvez's full-sized avatar

Yves Richard whyvez

View GitHub Profile
@whyvez
whyvez / README.md
Last active December 19, 2015 20:09
Ruby Array extension in order to render as geoJSON using the rgeo-geojon gem

Ruby Array to_geojson

####Dependencies

####Usage Add geojson_renderer.rb file into config/initializers folder Add array.rb file in /lib/core_ext folder Add require 'core_ext/array.rb' in environment.rb

@whyvez
whyvez / map.geojson
Created August 14, 2013 14:39
via:geojson.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whyvez
whyvez / s3geojson2shp.sh
Created October 17, 2013 15:21
Downloads all GeoJSON file recursively from an S3 bucket and appends into one master shp file.
#!/bin/bash
# usage: s3geojson2shp.sh my.bucket.com
# retreive all files from the s3 bucket
aws s3 cp --recursive s3://$1 .
# append .geojson to all files and append into master shp file
for file in *;
do
@whyvez
whyvez / various_commands.sh
Created October 28, 2013 12:09
various bash commands
#!/usr/bin/env bash
# run cmd in background after shell logout
# http://www.cyberciti.biz/tips/nohup-execute-commands-after-you-exit-from-a-shell-prompt.html
nohub doCommand.sh &
url=http://example.com
# curl into var
count=$(curl $url)
@whyvez
whyvez / 01InstallMongo.config
Last active January 2, 2016 01:29
aws .ebextentions mongodb config files
files:
"/etc/yum.repos.d/10gen.repo":
mode: "000777"
owner: root
group: root
content: |
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
@whyvez
whyvez / aws-install-node.sh
Created January 6, 2014 01:15
Installs node on a AWS linux dist
sudo yum update
sudo yum install gcc-c++ make
sudo yum install openssl-devel
sudo yum install git
git clone git://github.com/joyent/node.git
cd node
git checkout v0.6.8
./configure
@whyvez
whyvez / polymer-pre.jade
Last active January 3, 2016 05:49
example of what a polymer element could look like using language preprocessors.
link(rel="import", href="../bower_components/polymer/polymer.html")
polymer-element(name="my-element")
template(type="jade")
h1 This is my element
style(type="stylus")
h1
color red
script(type="coffeescript")
Polymer 'my-element',
@whyvez
whyvez / cors.txt
Last active August 29, 2015 13:56
cors.txt
from rmwb w/ no compat: (working)
"user-agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
from rmwb w/ compat: ( not working)
"user-agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; BRI/2)"
from spencer w/ compat: (working)
"user-agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; ASU2JS)"
@whyvez
whyvez / index.html
Last active August 29, 2015 13:56
leaflet with two layers
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>A Simple Map</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.css' rel='stylesheet' />