Skip to content

Instantly share code, notes, and snippets.

View p5150j's full-sized avatar
🎯
Focusing

Patrick p5150j

🎯
Focusing
View GitHub Profile
@p5150j
p5150j / gist:2493841
Created April 25, 2012 21:57
time o day
$.fn.mood = (function(){
var Mood = function(el, opts){
this.el = $(el);
this.range = { bottom: opts.range[0]*1, top: opts.range[1]*1 };
this.init();
};
Mood.prototype = {
init: function(){
this.initTime = this.checkTime(); // 1, 0, -1
@p5150j
p5150j / rubyvars
Created November 6, 2012 18:53
ruby puts vars
games = ["Super Mario Bros.", "Contra", "Metroid", "Mega Man 2"]
puts "Games in your vast collection: #{games.count}" unless games.empty?
<div class="bar btn btn-info" style="width: 20%;"></div>
Will be:
<div class="bar btn btn-info" style="width: <%= @job.AirToxicologyOne %>%;"></div>
@p5150j
p5150j / Patrick Ortell-local set-up
Created December 10, 2012 23:35
Patrick Ortell-local set-up
~cd almMngt
#cd into the application directory
~ rails s
#start server
~rake db:migrate
#migrating the database
#then wait to see the generated url for the application...as this is running locally on port 3000
<script>
$.getJSON('js/data_videos.json', function(data) {
var output="<li>";
for (var i in data.videos) {
output+="<video width='320' height='240' controls> <source src='+ data.videos[i].videoURLsDood'>" + "</video>";
}
output+="</li>";
document.getElementById("Featured").innerHTML=output;
});
@p5150j
p5150j / homrbrewInstall
Created May 7, 2013 21:21
homrbrew Install
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
@p5150j
p5150j / Homebrews binary path
Created May 7, 2013 21:27
Homebrews binary path
# Add Homebrews binary path to the front of the $PATH
echo "export PATH=/usr/local/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profile
@p5150j
p5150j / brewdoc
Last active December 17, 2015 02:29
brew doc
brew doctor
brew update
@p5150j
p5150j / rubyinstall
Created May 7, 2013 21:40
rubyinstall
brew install rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 2.0.0-p0
rbenv rehash