Skip to content

Instantly share code, notes, and snippets.

View thomasv314's full-sized avatar

Thomas Vendetta thomasv314

View GitHub Profile
'use strict';
angular.module('instangApp')
.service('TagService', function TagService($http, $q, $angularCacheFactory, Nginsta) {
// AngularJS will instantiate a singleton by calling "new" on this function
var cache = $angularCacheFactory('tagCache', {
maxAge: 3600000
});
message = {
"securityKey": "KEY",
"someCodes": {
"string": "RRUSAS"
},
"FirstRecordNumber": 1,
"NumberOfRecords": 2000
}
wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | \
sudo apt-key add -
wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | \
sudo apt-key add -
sudo dpkg -i intel-linux-graphics-installer_1.0.1_i386.deb
sudo apt-get -f install
intel-linux-graphics-installer
#https://01.org/linuxgraphics/downloads
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC56Ro1t7+XhZWCzSlYqGSKzk6rkIBiVuqGbfr9Jxnscpb8T0kUIXizhhrJRR282KPJX98YEld6VwRuY3xlBEsGswguZz2My31qJAQlHE9c992fJmaalvlWsH2u2cO/0x37sRrpQsAy1wZuMIXErft5HK5eIWDb+AMQgKawsBmsK3F1E8uuDK/fi/DuIboKsvZ1YiVseUHI4oGGsUaoYjopUY7FuINEqdnX9TjiUd90gWBckbuJMCbuuKX7ba2AWt2c4HqIEgTzSdDhxW8Mv3mqRtviYD/J5htv0py4+ul5ZB+W7iumnmV22ZjvTU5ldMOOcxZHzl1rSUoLHKurkzYh hasc@hasc-Z87X-OC
@thomasv314
thomasv314 / layout.html.erb
Created June 23, 2011 14:56
Description of a Rails 3 View file
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<%= stylesheet_link_tag :all %>
<link href="http://fonts.googleapis.com/css?family=Cantarell:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css" >
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
<% if !@mentions.empty? %>
<% @mentions.each do |mention| %>
$('#mentions').append('<%= escape_javascript("<div class=\"mention\"> #{mention[:text]} <br/><em>by #{link_to mention[:user][:name], "http://twitter.com/" + mention[:user][:screen_name]} </em></div>
") %>');
<% end %>
<% end %>
@thomasv314
thomasv314 / gist:1058944
Created July 1, 2011 17:00
NoMethodError: Undefined method 'deg2rad' for #<Class:0x0000>
class Listing < ActiveRecord::Base
set_table_name :Listing
scope :near, lambda{
|*args|
origin = *args.first[:origin]
if (origin).is_a?(Array)
origin_lat, origin_lng = origin
else
origin_lat, origin_lng = origin.latitude, origin.longitude
@thomasv314
thomasv314 / Controller.rb
Created July 14, 2011 15:19
Layar#new_pois is making a request for listings in near a certain lat/long/radius. It pulls all those listings and iterates through to grab data about each. GeoKit gem is returning the sam lat/long/distance for each. Ideas?
class LayarController < ApplicationController
include LayarHelper
def new_pois
userId = params[:userId]
developerId = params[:developerId]
developerHash = params[:developerHash]
timestamp = params[:timestamp]
layerName = params[:layerName]
@thomasv314
thomasv314 / gist:1179180
Created August 29, 2011 19:31
Rails error message when trying to generate a fresh devise install on a fresh rails 3.1 application
DevMac:AJJReg thomasvendetta$ rails generate devise:install
/Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/actionpack-3.1.0.rc6/lib/sprockets/railtie.rb:21:in `block (2 levels) in <class:Railtie>': undefined method `static_root=' for #<Sprockets::Environment:0x00000102e9e5a0> (NoMethodError)
from /Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/sprockets-2.0.0/lib/sprockets/environment.rb:55:in `initialize'
from /Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/actionpack-3.1.0.rc6/lib/sprockets/railtie.rb:20:in `new'
from /Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/actionpack-3.1.0.rc6/lib/sprockets/railtie.rb:20:in `block in <class:Railtie>'
from /Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/railties-3.1.0.rc6/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/thomasvendetta/.rvm/gems/ruby-1.9.2-p290@rails31pre/gems/railties-3.1.0.rc6/lib/rails/initializable.rb:25:in `run'
from /Users/thomasvendetta/.rvm/gems
{
"kind": "Listing",
"data": {
"modhash": "",
"children": [
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"media_embed": {},