MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
#!/bin/bash | |
# | |
# autosshd This script starts and stops the autossh daemon | |
# | |
# chkconfig: 2345 95 15 | |
# processname: autosshd | |
# description: autosshd is the autossh daemon. | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
/* | |
* Copyright (c) 2012 Brandon Jones | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. | |
* | |
* Permission is granted to anyone to use this software for any purpose, | |
* including commercial applications, and to alter it and redistribute it | |
* freely, subject to the following restrictions: |
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: autosshd | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: autosshd initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
sudo apt-get install uml-utilities build-essential linux-headers-`uname -r` | |
mkdir faketun | |
cd faketun | |
echo -e "#include <linux/module.h>\nstatic int start__module(void) {return 0;}\nstatic void end__module(void){return;}\nmodule_init(start__module);\nmodule_exit(end__module);">tun.c | |
echo -e "obj-m += tun.o\nall:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) modules\nclean:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) clean\nclean-files := Module.symvers">Makefile | |
make | |
sudo install tun.ko /lib/modules/`uname -r`/kernel/net/tun.ko | |
sudo depmod -a | |
sudo modprobe tun |
// http://nikhilm.github.io/uvbook/threads.html | |
#include <string> | |
#include <map> | |
#include <node.h> | |
#include <v8.h> | |
#include <uv.h> | |
#include <sys/syscall.h> | |
#include <stdlib.h> |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
Disclaimer: The instructions are the collective efforts from a few places online. | |
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
First off, bundle. | |
================== | |
1. cd to the project directory | |
2. Start the react-native packager if not started | |
3. Download the bundle to the asset folder: | |
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |