Skip to content

Instantly share code, notes, and snippets.

@donaldparker
donaldparker / gist:0902c451896cfa96d556
Last active August 29, 2015 14:05
AWS install MEAN + socket.io
aws install MEAN
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
#makesure you are in the directory with .pem file downloaded from ec2 console
ssh -i myec2access.pem ec2-user@URL.compute.amazonaws.com
sudo yum install gcc-c++
sudo yum install openssl-devel
@sp-ice
sp-ice / home.html
Created August 31, 2014 16:12
JavaScriptでArduinoとシリアル通信
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@kybernetikos
kybernetikos / gist:a264fba207527d775032
Created June 29, 2014 17:37
Asteroids: Machine Learning
try {
var WAIT = "wait"
var FIRE = "fire"
var ACTIONS = [WAIT, FIRE]
if (!context.classesDefined) {
context.classesDefined = true;
context.WorldState = function WorldState(numberOfAsteroids, asteroidX, asteroidVx, fired) {
this.asteroidX = asteroidX
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@schnell18
schnell18 / shutdown_vboxnet0
Created November 15, 2013 13:47
Remove and re-create the host only network vboxnet0 to work around issue which hangs OSX Maverick shutdown process
#!/bin/sh
# This script is a workaround to virtualbox
# hostonly network hang on OSX Maverick.
vboxmanage hostonlyif remove vboxnet0
vboxmanage hostonlyif create
@natevw
natevw / gist:1878200
Created February 21, 2012 19:06
build-couchdb fail on EC2
[ec2-user@ip-XX-XX-XX-XX ~]$ cat build-couchdb/nohup.out
(in /home/ec2-user/build-couchdb)
/home/ec2-user/build-couchdb/tasks/couchdb.rake:36: warning: (...) interpreted as grouped expression
autoconf2.13
env /home/ec2-user/build-couchdb/dependencies/spidermonkey/js/src/configure --prefix=/home/ec2-user/build-couchdb/build --without-x --disable-tests
Build CouchDB commit: 106ba9ded5ae939fe03d806d302c664ae7499466
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
@abahgat
abahgat / gae-memcache-decorator.py
Last active January 22, 2021 00:43
A Python decorator to cache method results using memcache on Google AppEngine
import functools
import logging
from google.appengine.api import memcache
def cached(time=1200):
"""
Decorator that caches the result of a method for the specified time in seconds.
Use it as: