Skip to content

Instantly share code, notes, and snippets.

@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 20, 2024 13:01 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@jeffrafter
jeffrafter / server.js
Created August 28, 2010 21:37
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {
@jetztgradnet
jetztgradnet / eb-create-app.sh
Created February 3, 2011 02:43
Script to start an Amazon ElasticBeanstalk application with configuration parameters
#!/bin/sh
########################################################
# history
########################################################
#
# 0.3 (2011-02-08)
# - create/update configuration template 'InitialConfig' instead
# of 'Default', which is not editable
#
(function() {
// NOTE: I have intentionally avoided the use of jQuery in
// the next two functions so as not to obscure any details.
// Updates the DOM in such a way that layout is constantly
// computed and thrown away.
var UpdateThrash = function(data) {
// Get all the labels
var spans = document.querySelectorAll('.item .lab');
@fightingtheboss
fightingtheboss / configuration.yml
Last active September 15, 2023 07:29
An Amazon Elastic Beanstalk configuration file for a Meteor project. This file needs to be saved in the .ebconfiguration/ directory at the root of your project. Deployed with `git aws.push`. Replace MONGO_URL with the URL to your MongoDB instance (I use MongoHQ).
packages:
yum:
git: []
files:
/opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh:
mode: "000755"
user: root
group: root
encoding: plain
anonymous
anonymous / jsbin.xajom.html
Created February 12, 2014 22:38
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
.diagram {
padding:40px;
package net.tixxit.data
import scala.annotation.tailrec
import scala.collection.generic.CanBuildFrom
import scala.math.Ordering
import scala.math.Ordering.Implicits._
/**
* An immutable list that maintains a sorted order. At any time, the entire
* list can be traversed, in sorted order in O(n). A single insert is O(log n),
@davecap
davecap / 99datadog.config
Created April 24, 2014 02:20
.ebextensions/99datadog.config
# .ebextensions/99datadog.config
container_commands:
01chmod:
command: "chmod +x .ebextensions/datadog/hooks/*"
02mkdir_appdeploy_post:
test: '[ ! -d /opt/elasticbeanstalk/hooks/appdeploy/post ]'
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
02mkdir_configdeploy_post:
test: '[ ! -d /opt/elasticbeanstalk/hooks/configdeploy/post ]'
command: "mkdir /opt/elasticbeanstalk/hooks/configdeploy/post"
# Node-WebKit CheatSheet
# Download: https://github.com/rogerwang/node-webkit#downloads
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions
# Wiki: https://github.com/rogerwang/node-webkit/wiki
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium
# 1. Run your application.
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps
@markgoodyear
markgoodyear / task.js
Created October 11, 2014 09:54
Concat all modules first in Angular
var paths = {
src: [
'src/scripts/app/**/*module*.js',
'src/scripts/app/**/*.js'
],
dest: 'app/assets/scripts'
};
gulp.task('scripts', function () {