Skip to content

Instantly share code, notes, and snippets.

Avatar

Riley Guerin rileytg

View GitHub Profile
@rileytg
rileytg / add-deps.sh
Last active Aug 29, 2015
require js config for a yeoman project
View add-deps.sh
# grunt buildcontrol
npm install --save-dev grunt-build-control
# Require JS
npm install --save-dev grunt-processhtml grunt-contrib-requirejs
bower install --save requirejs
# Jasmine Testing
npm install --save-dev grunt-template-jasmine-requirejs grunt-contrib-jasmine
@rileytg
rileytg / index.html
Created Jul 4, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Simple login/subsribe form &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
@rileytg
rileytg / index.html
Created Jul 4, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Simple login/subsribe form &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
@rileytg
rileytg / index.html
Created Jul 4, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Simple login/subsribe form &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
@rileytg
rileytg / index.html
Created Jul 4, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Matt Hamm's Page Curl Boxes &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
@rileytg
rileytg / heroku.coffee
Created Oct 14, 2012 — forked from johnbeynon/heroku.coffee
Heroku Hubot Script
View heroku.coffee
# A limited way to interact with the Heroku API.
#
# INSTALLATION:
# 1. Create file in scripts folder in hubot folder
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1"
# 3. Set heroku config variable HEROKU_USER to heroku user account to use
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page)
#
# heroku status - Retrieve the most recent tweet from the @herokustatus account
# heroku ps --app <appname> - Get process information for application
View olark.html.haml
-#<!-- begin olark code -->
%script(data-cfasync="false" type='text/javascript')
/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
a.p[u]=new Date-a.p[0]};function s(){
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
View download.rb
def download_file(url)
uri = URI(url)
Rails.logger.info("Downloading evidence #{id} from filepicker.io")
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
request = Net::HTTP::Get.new(uri.path)
http.request(request) do |response|
file = File.new('evidence')
@rileytg
rileytg / redmine.rb
Last active Dec 18, 2015
example api call into ruby obj
View redmine.rb
require 'json'
require 'rest-client'
response = RestClient.get "/gem/#{name}.json"
version = JSON.parse(response)['version']
View install_graphite_statsd_ubuntu_precise.sh
#!/bin/bash
# Make sure we're all updated
sudo apt-get update
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get install nodejs