This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.alphabetized_by_label | |
initial_hash = all.group_by(&:product_type_name) | |
initial_hash.each do |key, value| | |
initial_hash[key] = value.sort{|x,y| x.en_name <=> y.en_name} | |
end | |
{}.tap do |final_hash| | |
initial_hash.keys.sort.each do |key| | |
final_hash[key] = initial_hash[key] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration_types = [ | |
{ | |
:en_name => "Handheld", | |
:es_name => "De mano", | |
:position => 1, | |
:color => "#6b8fbf" | |
}, | |
{ | |
:en_name => "Lavalier", | |
:es_name => "De solapa", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
# this line kills the existing speak.rb if one is running | |
for X in `ps aux | grep speak.rb $1 | awk {'print $2'}`; do kill $X; done | |
# need to cd to the proper directory for relative path reasons in the ruby code | |
cd ~/Desktop/jinglebots/robot | |
ruby speak.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Password: | |
debug3: packet_send2: adding 32 (len 22 padlen 10 extra_pad 64) | |
debug2: input_userauth_info_req | |
debug2: input_userauth_info_req: num_prompts 0 | |
debug3: packet_send2: adding 48 (len 10 padlen 6 extra_pad 64) | |
debug1: Authentication succeeded (keyboard-interactive). | |
Authenticated to 192.168.7.104 ([192.168.7.104]:22). | |
debug1: channel 0: new [client-session] | |
debug3: ssh_session2_open: channel_new: 0 | |
debug2: channel 0: send open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app="Twitter"> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular-resource.min.js"></script> | |
<script type="text/javascript" src="twitter.js"></script> | |
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'twitter/json_stream' | |
require 'json' | |
TWITTER = { | |
:username => "letitsnow1415", | |
:password => "", | |
:search_terms =>["viget"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import random | |
from ctypes import * | |
from Phidgets.Devices.InterfaceKit import InterfaceKit | |
from Phidgets.PhidgetException import PhidgetErrorCodes, PhidgetException | |
try: | |
kit = InterfaceKit() | |
kit.openPhidget() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/avatars" for 127.0.0.1 at 2012-10-29 11:35:49 -0400 | |
Processing by AvatarsController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"VpFNQxYczGC3d/m+HlC8ski3vPCIwJu8xbmb70HpJ7I=", "avatar"=>{"image"=>#<ActionDispatch::Http::UploadedFile:0x007f8b2fae2ec0 @original_filename="vigeclones.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"avatar[image]\"; filename=\"vigeclones.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/var/folders/j3/zdf8571x7cx8q0mwm2c_r57r0000gn/T/RackMultipart20121029-23346-bh66db>>}, "commit"=>"Add Image"} | |
Command :: identify -format %wx%h '/var/folders/j3/zdf8571x7cx8q0mwm2c_r57r0000gn/T/vigeclones20121029-23346-1qx7yn.jpg[0]' | |
Command :: identify -format %m '/var/folders/j3/zdf8571x7cx8q0mwm2c_r57r0000gn/T/vigeclones20121029-23346-1qx7yn.jpg[0]' | |
Command :: identify -format %m '/var/folders/j3/zdf8571x7cx8q0mwm2c_r57r0000gn/T/vigeclones20121029-23346-1qx7yn.jpg[0]' | |
Command :: convert '/var/folders/j3/zdf8571x7cx8q0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Time.zone = ActiveSupport::TimeZone[-6].name | |
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15)) | |
got: "Saturday July 7th from 9:30 to 10:15 AM" | |
Time.zone = ActiveSupport::TimeZone[-5].name | |
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15)) | |
got: "Saturday July 7th from 10:30 to 11:15 AM" | |
Time.zone = ActiveSupport::TimeZone[-4].name | |
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |