Skip to content

Instantly share code, notes, and snippets.

View thehydroimpulse's full-sized avatar

Somewhere thehydroimpulse

View GitHub Profile
anonymous
anonymous / foo.rs
Created December 28, 2013 18:14
#[no_uv];
extern mod native;
#[start]
fn start(argc: int, argv: **u8) -> int {
do native::start(argc, argv) {
main();
}
}
@nodesocket
nodesocket / bootstrap.flatten.css
Last active June 3, 2026 23:25
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@ozkatz
ozkatz / ec2_ssh_config.py
Created June 21, 2013 00:50
generate an ~/.ssh/config file from your EC2 instances, so that you'd never have to lookup those fugly ec2-xx-xx-xx-xxx.compute-1.amazonaws.com hostnames again. Use your instance name instead!
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active August 29, 2026 20:37
A badass list of frontend development resources I collected over time.
@HairyFotr
HairyFotr / gist:4995607
Created February 20, 2013 13:38
Scala Clojure interop wrapper
class ClojureWrap(ns: String, objName: String) {
import clojure.lang.{RT,Var}
import scala.collection.mutable.HashMap
RT.loadResourceScript(objName+".clj")
val obj = ns+"."+objName
val funcs = new HashMap[String, Var]
def /(func: String, a: Any): Object =
funcs.getOrElseUpdate(func, RT.`var`(obj, func)).invoke(a.asInstanceOf[Object])
@thehydroimpulse
thehydroimpulse / index.html
Last active December 12, 2015 09:09
Splitting ember.js compilation on both the server (Node.js) and client-side. This would solve search engine crawling, speed, and some others. I also gota simple server side implementation. Had to port ember-view to node.js. things are still somewhat unstable. Some issues on the server : * Lack of Router * This means Controllers and Views are not…
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Fast Boot</title>
</head>
<body>
<!-- Main application template -->
<script type="text/x-handlebars" data-template-name="application">
Application Template - {{name}}
@lancejpollard
lancejpollard / potentialAdapterUsages.js
Last active December 12, 2015 01:18
Brain dumping on adapters.js
// associating properties from different apis with your model.
// say, by default if the associated fields are blank, it will
// fetch and save them from the service.
// `linkedIn.resume` has similar API meaning to `DS.attr('App.Company')`
adapter('linkedIn')
.resource('resume')
.mixin({
find: function(criteria, callback) {
// criteria ==
@lancejpollard
lancejpollard / adapter.js
Last active December 12, 2015 01:09
Criteria for Generic Datastore API (tower internals)
function adapter(name) {
return adapter.instances[name] || (adapter.instances[name] = new AdapterClass(name));
}
adapter.instances = {};
function AdapterClass(name) {
this.name = name;
this.types = {};
this.mixins = [];
@justinbmeyer
justinbmeyer / jsmem.md
Last active June 29, 2024 16:00
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...