Skip to content

Instantly share code, notes, and snippets.

View benr75's full-sized avatar
💭
Serenity Now.

Ben Reubenstein benr75

💭
Serenity Now.
View GitHub Profile
# app/assets/stylesheets/application.css
@import 'cookieconsent/build/cookieconsent.min.css';
# In dev 200
https://localhost:3000/assets/cookieconsent/build/cookieconsent.min.css
# In prod 404
@benr75
benr75 / rails_setup_macOS.md
Last active December 19, 2019 04:49
Instructions for getting a Rails Environment setup on macOS

Instructions to setup a Rails Environment on macOS

Supporting Software

Install Xcode. Be sure to open it once an install the additional components.

Install Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#!/usr/bin/env ruby
#
# gem install cloudapp_api
# ruby cloud-delete.rb
#
EMAIL_ADDRESS = "**************"
PASSWORD = "**************"
ROOT = File.expand_path('../cloudapp-export', __FILE__)
PER_PAGE = 50

Keybase proof

I hereby claim:

  • I am benr75 on github.
  • I am benr75 (https://keybase.io/benr75) on keybase.
  • I have a public key ASB2ww6bsuj3_628Gq_qq9QqB97irfrU8lPnSVhV1Q4I4Ao

To claim this, I am signing this object:

@benr75
benr75 / gource.sh
Last active March 14, 2018 21:42 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
@benr75
benr75 / checkfeed.rb
Last active November 22, 2016 19:15
Quick script to check how long it takes to get an http resource
require 'curb'
if ARGV[0].nil? || ARGV[1].nil?
puts "usage 'ruby checkfeed.rb FEEDURL TIMESTORUN'"
else
ttr = ARGV[1].to_i
x = 0
while x < ttr
http = Curl.get(ARGV[0])
puts http.total_time
@benr75
benr75 / send_phish_pushes.rb
Created September 11, 2016 16:59
# Script to send push notifications for each song in a Phish Setlist via an updateable Push Notification.
# Script to send push notifications for each song in a Phish Setlist via an updateable Push Notification.
# Place a config.yml in the same directory as the script and your push notification PEM file.
#
# Config Format:
# push_token: XXXXXXXXXXXXXX
# phish_api_key: XXXXXXXXXXXXXX
# push_mode: XXXXXXXXXXXXXX # development or production
require 'apnotic'
@benr75
benr75 / gist:5646723
Created May 24, 2013 21:47
JSON pretty from commandline
#!/usr/bin/env ruby
# Example usage:
# curl https://api.twitter.com/1/statuses/show.json?id=231426135903305728 | jsonviewer.rb
#
require 'rubygems'
require 'awesome_print'
require 'json'
@benr75
benr75 / jv.rb
Created August 4, 2012 21:17
Display JSON nicely from the command line using ruby
#!/usr/bin/env ruby
# Example usage:
# curl https://api.twitter.com/1/statuses/show.json?id=231426135903305728 | jv.rb
#
require 'rubygems'
require 'awesome_print'
require 'json'
@benr75
benr75 / gist:1141103
Created August 11, 2011 23:51
Error with Sprockets Fix
Seeing errors like this?
" NoMethodError: undefined method `process_Reset_directive' for #<Sprockets::DirectiveProcessor:0x007fc96d8de918> (in ../app/assets/stylesheets/style.css.scss:1)02f assets\002f stylesheets\002f style.css.scss:1)"
"/gems/sprockets-2.0.0.beta.13/lib/sprockets/directive_processor.rb:191:in `block in process_directives'ctive_processor.rb:191:in `block in process_directives'"
Don't make comments like this:
/* =Something ----*/