Skip to content

Instantly share code, notes, and snippets.

View SomeKittens's full-sized avatar

Randall Koutnik SomeKittens

View GitHub Profile

From stevefulton on this Cracked article

All these are reason why, I believe, the "prequels" were not the actual stories, but propaganda stories created by Palpatine and his minions to make the Jedi look terrible and worthless. Midiclorians were created so that the rest of the people in the universe would not try to become Jedi, as they would "measure" their "Midiclorian level" and find that it was low or non-existent...because they don't exist. The Jedi in the stories and bumbling fools who can't see what is right in front of them. At the same time, they make Palapatine look like the smartest, most powerful in the universe. Who would ever want to mess with him? The "real" stories of the Clone Wars, etc. are yet to be told, and I'm pretty sure we will see them surface as a new trilogy very soon.

@SomeKittens
SomeKittens / tmp.html
Last active August 29, 2015 14:23
Batarang repro
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>asdf</title>
</head>
<body ng-controller="asdf as A">
{{ A.text }}
<button ng-click="A.button();">A button!</button>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script type="text/javascript">
#!/bin/zsh
# Noodling around with window auto-setup
# http://movingtofreedom.org/2010/08/10/arranging-windows-from-the-gnulinux-command-line-with-wmctrl/
left_monitor="0"
middle_monitor="1300"
right_monitor="3201"
get_window_id() {
return $(wmctrl -l | grep "$1" | tail -1 | cut -f1 -d" ")

Angular Buddies FOSS Bash!

(pssst - not a member of Angular Buddies yet? Join here!. You're looking for the #bash channel.)

Welcome to the first FOSS Bash! This is an experiment - everything's subject to change, feedback welcome.

The goal of the FOSS Bash is like an Amish barn rasing - lots of smart folks getting together to accomplish a great thing in a day. Today's target is UI Layout. My goal is to halve the number of issues, down to 13, and zero open PRs.

How you can help

@SomeKittens
SomeKittens / aResults.md
Last active September 18, 2015 20:48
JavaScript Array.prototype vs for loops
[randallkoutnik:~/Dropbox/node/perf]$ node index.js
--- .forEach ---
.forEach took 26.271 ms
for loop took 2.369 ms
--- filter ---
.filter took 6.790 ms
for loop took 4.008 ms
@SomeKittens
SomeKittens / gist:3940292
Created October 23, 2012 17:44
Brief product description/needs
Hi all! I'd like your input on something:
I'm about to start building my first big project. I've built smaller things before, but they were all for Joomla. I'd like to expand my knowledge with an ambitious project.
Here's what we're aiming to build:
-A search engine that only searches our database (no web crawling, etc).
-A payment system to purchase what our users find.
I'm looking for whatever will allow us to get this up and running quickly, but allow for further customization later. Good documentation/tutorials are a must. It doesn't need to do the above (we're big fans of writing our own code for core functions).
@SomeKittens
SomeKittens / index.js
Created November 9, 2012 22:29
index.js for my blog framework
"use strict";
//Require other files
var server = require("./server");
var router = require("./router");
var requestHandlers = require("./requestHandlers");
//Create autoloader/handler
var handle = {};
handle["/"] = requestHandlers.home;
handle["/admin"] = requestHandlers.admin;
@SomeKittens
SomeKittens / Universal Language draft
Created November 27, 2012 23:47
Blog rough draft
What if you could use the same language anywhere you go? Server/clientside, desktop, mobile, game dev, physics simulators, EBook readers, etc. This sounds like a pipe dream, and it is in a way. If it was possible, what would we want the language to look like? It would have to be:
Fast
Open and Extensible
Simple, yet powerful
Easy to debug (If it's appropriate to yell "HEEEEY MACARENA" at the end of your message, it might be too complicated).
Language nesting (You can write the language in the language)
Well-documented
(An argument could be made for rapid prototyping, but this usually relies more on libraries than the language).
@SomeKittens
SomeKittens / gist:4503031
Created January 10, 2013 15:47
Better fib generator in js
//This one caches the previous results so we're not constantly re-calculating things we already know
//Fiddle: http://jsfiddle.net/somekittens/7R5bs/
function fibDriver(n) {
return n === 0 ? 0 : fib(0, 1, n);
}
function fib(a, b, n) {
return n === 1 ? b : fib(b, a + b, n-1);
}
@SomeKittens
SomeKittens / System.out
Created March 2, 2013 19:52
Rebol script to execute JavaScript's `console.log`. In other news, I really need to get a life.
parse js [
thru {console.log("} copy message to {");} (print message)
]