Skip to content

Instantly share code, notes, and snippets.

View nuclearsandwich's full-sized avatar

Steven! Ragnarök nuclearsandwich

View GitHub Profile
@nuclearsandwich
nuclearsandwich / wheel_of_fortune.py
Created May 7, 2013 21:20
CoderDojo Wheel of Fortune Game
###############################FUNCTIONS CREATED BY GROUPS####################################
#INTERMEDIATE GROUP 1
#TAKES A STRING INPUT AND RETURNS A STRING THAT HAS ALL THE
#LETTERS REPLACED WITH DASHES (THE SPACES REMAIN AS SPACES)
def replaceWithDashes(string):
dashes = ""
#fill in here
return dashes
class Identity < ActiveRecord::Base
belongs_to :user
has_many :accounts
# relation logic methods.
end
class Account < ActiveRecord::Base
belongs_to :identity
end
<?php
define('AWS_KEY','YOUR_AWS_KEY_HERE');
define('AWS_SECRET','YOUR_AWS_SECRET_HERE');
require_once('AWSSDKforPHP/sdk.class.php');
require_once('AWSSDKforPHP/extensions/s3streamwrapper.class.php');
$s3 = new AmazonS3(array(
'key' => AWS_KEY,
'secret' => AWS_SECRET,

How did you get into coding?

I started programming when I was very young since my father worked as a programmer and taught me how to program so I wouldn't pester him.

What is the hardest part about coding?

The hardest part is calling something done, or more accurately, ready to share with everyone else.

What is the most rewarding part of it?

@nuclearsandwich
nuclearsandwich / #clojure.md
Last active December 14, 2015 09:08
I can't star things in IRC yet. So here's this gist.
18:55:37            tomoj | any ideas of examples of what rich was getting at when he said we could do so much better than predicate dispatch?
19:00:16     ★gfredericks | I never know what anybody means when they make sweeping value judgments :(
21:29:12 ZZZZZZ | k i'll go on the link and plz msg me if u cn get info on alienware i'll wait 4 ur reply...
21:30:28 nuclearsandwich | I am not going to research Alienware machines for you.
21:31:40 ZZZZZZ | k no trobles bt cn i troble u if i get stuck somewhere ???? It will be really generous of u
21:31:56 nuclearsandwich | Getting a machine is like any tool. Until you've used it long enough to become picky. There's little reason to fuss over it.
21:32:46 nuclearsandwich | Rather than rely on one person. Try first checking to see if your question has been answered on StackOverflow.com or a project's
| mailing list.
21:33:34 nuclearsandwich | If it hasn't try asking there. This keeps you from imposing on any one person and will usually get you a better answer, and more
-- Written by notthemessiah in #elm on Freenode.
-- MODEL
ship = { x=100, y=100, vx=0, vy=0, a=0.0}
-- UPDATE -- ('m' is for model, formerly mario)
move t m = { m | x <- m.x + t*m.vx , y <- m.y + t*m.vy }
drag t m = { m | vx <- m.vx - 0.01 * t*m.vx, vy <- m.vy - 0.01 * t*m.vy}
thrust {y} m = { m | vx <- m.vx + cos(m.a*2*pi)*y , vy <- m.vy + sin(m.a*2*pi)*y }
turn {x} m = { m | a <- m.a + x/32}
@nuclearsandwich
nuclearsandwich / cliptext.rb
Last active December 10, 2015 02:58 — forked from noahcoad/cliptext.rb
change tabs to two spaces. part deux
#!/usr/bin/env ruby
# Places the clipboard contents into a new temp text
# file and opens the text file in the default text editor
require 'ftools'
# find an unused file name
a = 1
folder = File.expand_path "~/Documents/texts/temp"
@nuclearsandwich
nuclearsandwich / gist:4107512
Created November 18, 2012 21:11
Chromium build failure on Archlinux x64
content/common/cc_messages.cc: In static member function ‘static bool IPC::ParamTraits<WebKit::WebFilterOperation>::Read(const IPC::Message*, PickleIterator*, IPC::ParamTraits<WebKit::WebFilterOperation>::param_type*)’:
content/common/cc_messages.cc:83:6: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no member named ‘setType’
content/common/cc_messages.cc:97:12: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no member named ‘setAmount’
content/common/cc_messages.cc:105:12: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no member named ‘setDropShadowOffset’
content/common/cc_messages.cc:106:12: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no member named ‘setAmount’
content/common/cc_messages.cc:107:12: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no member named ‘setDropShadowColor’
content/common/cc_messages.cc:118:12: error: ‘IPC::ParamTraits<WebKit::WebFilterOperation>::param_type’ has no
18:13:19 Jonas | Yo ho ma bro ho
18:14:18 nuclearsandwich | /unfriend
18:14:34 Jonas | If that were an option then we'd have done it a long time ago.