Skip to content

Instantly share code, notes, and snippets.

View jameswritescode's full-sized avatar
✍️

James Newton jameswritescode

✍️
View GitHub Profile
@jameswritescode
jameswritescode / asshole.js
Created May 28, 2011 22:29 — forked from Kilian/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Licensed under the MIT license. http://www.opensource.org/licenses/mit-license.php
*
*/
@jameswritescode
jameswritescode / gist:1408456
Created November 30, 2011 08:50 — forked from ibeex/gist:1400432
Simple web server watchdog
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Simple web server watchdog, edit constants and stop start commands
preferably run with daemon
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
"""
@jameswritescode
jameswritescode / gist:2421904
Created April 19, 2012 15:49
How Objective-C was born
[17:46:51] < newton> I think I explained obj-c to my coworker as
[17:47:08] < Phelps> C with too many []()-+
[17:47:28] < newton> java php c++ scala java clojure python ruby perl haskell lisp lua and any other languages I might have forgotten
[17:47:33] < newton> ran a train on c
[17:47:40] < newton> and obj-c was the terrible result
[17:47:44] < Phelps> lol
[09:06:52] < newton> I'mma change my life insurance later
[09:07:00] < newton> I just did it for the time being
[09:07:08] < newton> since there is nobody else I can think of putting on it for now
[09:07:20] < Dro> <-
[09:07:26] <@tj> <-
[09:07:58] < newton> people that won't try to murder me
[09:08:04] < Phelps> ohh
[09:08:05] < Phelps> well
[09:08:16] < Phelps> that changes things
[09:08:18] < newton> maybe if I put myself then I'll paradox myself into undeath
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@jameswritescode
jameswritescode / gist:2571526
Created May 1, 2012 21:24
Megadeth on Android ports
Create Android in Java, and you're a murderer.
Port it to C# and you're a conquerer.
Port to Objective-C, yooooouuuu'rrreee a Gooooooooooood!
@jameswritescode
jameswritescode / gist:2696677
Created May 14, 2012 20:39
What stock should I buy?
[22:37:41] < Monie> WHAT STOCK SHOULD I INVEST IN, IN THE FALL?
[22:37:49] < Monie> I'LL BE GETTING $3,000 BACK FROM THE SCHOOL
[22:37:54] < newton> a macbook pro
[22:38:03] < Monie> true
[04:28:56] < newton> are we thinking
[04:28:57] < newton> the same think
[04:29:03] < Monie> is it funny I had my gf hum on my balls once
[04:29:04] < Dro> Lol
[04:29:06] < Monie> shit felt amazing
[04:29:15] < newton> okay we are not thinking the same thing
@jameswritescode
jameswritescode / index.html
Created July 13, 2012 01:17 — forked from anonymous/index.html
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Glowing Pulse Form &middot; CodePen</title>
<!--
Copyright (c) 2012 Jack Rugile, http://codepen.io/jackrugile
Permission is hereby granted, free of charge, to any person obtaining
(function($){
function dragEnter(e) {
$(e.target).addClass("dragOver");
e.stopPropagation();
e.preventDefault();
return false;
};
function dragOver(e) {
e.originalEvent.dataTransfer.dropEffect = "copy";