Skip to content

Instantly share code, notes, and snippets.

@TylerLH
TylerLH / make.error.log
Created October 18, 2011 22:24
ubuntu 11.10 + ruby 1.9.2 + rvm install + make error
[2011-10-18 17:46:39] make
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I. -I.ext/include/x86_64-linux -I./include -I. -DRUBY_EXPORT -o main.o -c main.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I. -I.ext/include/x86_64-linux -I./include -I. -DRUBY_EXPORT -o dln.o -c dln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I. -I.ext/include/x86_64-linux -I./include -I. -DRUBY_EXPORT -o dmydln.o -c dmydln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -I. -I.ext/include/x86_64-linux -I./include -I. -DRUBY_EXPORT -o dmyencoding.o -c dmyencoding.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parenth
@TylerLH
TylerLH / capture.pde
Created July 18, 2012 23:43
cam capture in processing using gsvideo
/**
* Getting Started with Capture.
*
* GSVideo version by Andres Colubri.
*
* Reading and displaying an image from an attached Capture device.
*/
import codeanticode.gsvideo.*;
GSCapture cam;
@TylerLH
TylerLH / 50shadesofgrey
Created July 31, 2012 21:05
50 Shades of Grey
rgb(39,39,39) => #272727
rgb(40,40,40) => #282828
rgb(41,41,41) => #292929
rgb(43,43,43) => #2b2b2b
rgb(44,44,44) => #2c2c2c
rgb(46,46,46) => #2e2e2e
rgb(49,49,49) => #313131
rgb(50,50,50) => #323232
rgb(52,52,52) => #343434
rgb(53,53,53) => #353535
@TylerLH
TylerLH / Trial.rb
Created August 1, 2012 20:17
Trial example URL generation
class Trial < ActiveRecord::Base
TRIAL_TYPES = ["usability","clickmap","interview","survey"]
has_many :stints, :dependent => :nullify
has_many :tasks, :dependent => :destroy
before_validation :generate_access_token
attr_accessible :url, :access_token, :trial_type, :title, :description
validates_presence_of :access_token, :trial_type, :title, :description
@TylerLH
TylerLH / gist:5440398
Last active December 16, 2015 13:19 — forked from shanselman/gist:5422230
Comment spam template
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
import java.util.Scanner;
public class TestGrade {
public static void main(String [ ] args) {
int numberOfGrades;
int total = 0;
float average;
Scanner keyboard = new Scanner(System.in);
@TylerLH
TylerLH / Project1.java
Last active August 29, 2015 13:57
Project1.java
import java.util.Scanner;
public class Project1
{
public static void main (String[] args)
{
Scanner kb = new Scanner(System.in);
Boolean running = true;
double originalGrade = 0;
int userSelection = 0;
R = 2.0 # Cookies per second
C = 500.0 # Cost of a farm
F = 4.0 # CPS per farm owned
X = 2000.0 # Cookies needed to win
elapsedTime = 0.0
cookies = 0.0
timeForNextFarm = ->
cookiesNeeded = C - cookies
@TylerLH
TylerLH / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
<html>
<head>
<title>Tyler Hughes</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hey yo</h1>
</body>
</html>