Skip to content

Instantly share code, notes, and snippets.

View leofrozenyogurt's full-sized avatar

Leo Royzengurt leofrozenyogurt

  • Hipsters and Hamptonites
  • United States
View GitHub Profile
invoice_receiver_list = [
:invoiceData=>{
"item" =>{:name=>"awesome ", :identifier=>"awesome re", :price=>8.0, :itemPrice=>7.0, :itemCount=>1},
"item" =>{:name=>"awesome sauce", :identifier=>"awesome", :price=>7.0, :itemPrice=>7.0, :itemCount=>1}
}
]
/**
* Author: Derek Gould
* Date: 8/19/13
* Time: 2:44 PM
*/
angular.module('vr.directives.nlForm', ['vr.directives.nlForm.select', 'vr.directives.nlForm.text']);
angular.module('vr.directives.nlForm.select',[])
.directive('nlSelect', function(){
def index
if params[:search][:groups].present?
@product_marks = Rails.cache.fetch('product_marks', :expires_in => 24.hours) {
@products_ids =[]
@group=AllergenGroup.find(params[:search][:groups])
@tags= @group.tags
@ingredients =[]
@tags.each do |t|
t.ingredients.each do |ti|
@ingredients << ti
process :auto_orient # this should go before all other "process" steps
def auto_orient
manipulate! do |image|
image.tap(&:auto_orient)
end
end
process :resize_to_fit => [400, 400]
<a href="http://www.google.com" >
<img src="put source here" >
</a>
<img src="put source here" >
traceroute to dfw-mongos0.objectrocket.com (98.129.8.150), 64 hops max, 52 byte packets
1 * * *
2 68.173.214.185 (68.173.214.185) 49.161 ms 10.326 ms 52.183 ms
3 agg58.nyquny9101r.nyc.rr.com (184.152.112.91) 57.399 ms 65.648 ms 36.931 ms
4 107.14.19.22 (107.14.19.22) 21.085 ms 63.153 ms 61.850 ms
5 107.14.17.218 (107.14.17.218) 63.618 ms
107.14.17.216 (107.14.17.216) 17.425 ms
107.14.17.218 (107.14.17.218) 64.787 ms
6 unk-426d072a.adelphiacom.net (66.109.7.42) 64.491 ms 15.397 ms 62.728 ms
7 ae8.cr1.lga5.us.above.net (64.125.26.161) 75.155 ms 68.911 ms 19.072 ms
@leofrozenyogurt
leofrozenyogurt / app.js
Created March 26, 2014 16:53
Carlo Code Sample
var ready;
ready = function() {
$('#signup').click(function(){
$('#myModal').modal('show');
return false;
});
$('#written_material').click(function(){
$('#myModal').modal('show');
@leofrozenyogurt
leofrozenyogurt / gist:9314421
Created March 2, 2014 21:42
refactor of user controller
if user_signed_in?
@user=current_user
@subscription= Subscription.new
@[email protected]
@all_talks=Talk.all
@[email protected]_watchings
@[email protected]_talks
#initiate totals for each state
@total_ny=0
@total_ny_ethics=0
@leofrozenyogurt
leofrozenyogurt / class-morgan-featured-admin
Created February 21, 2014 19:26
featured posts admin
class ContactController < ApplicationController
def new
@message = Message.new
end
def create
@message = Message.new(params[:message])
if @message.valid?