start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
class Auth extends Laravel\Auth {} | |
/** | |
* @method static add(string $name, string $source, array $dependencies = array(), array $attributes = array()) | |
* @method static string styles() | |
* @method static string scripts() | |
*/ | |
class Asset extends Laravel\Asset {} | |
class Autoloader extends Laravel\Autoloader {} | |
class Bundle extends Laravel\Bundle {} |
/* | |
See dev dependencies https://gist.github.com/isimmons/8927890 | |
Compiles sass to compressed css with autoprefixing | |
Compiles coffee to javascript | |
Livereloads on changes to coffee, sass, and blade templates | |
Runs PHPUnit tests | |
Watches sass, coffee, blade, and phpunit | |
Default tasks sass, coffee, phpunit, watch | |
*/ |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
function WebmailViewModel() { | |
// Data | |
var self = this; | |
self.folders = ['Inbox', 'Archive', 'Sent', 'Spamh']; | |
self.chosenFolderId = ko.observable(); | |
self.chosenFolderData = ko.observable(); | |
self.chosenMailData = ko.observable(); | |
// Behaviours | |
self.goToFolder = function(folder) { location.hash = folder }; |
#coding: utf-8 | |
from bottle import route, error, post, get, run, static_file, abort, redirect, response, request, template | |
@route('/') | |
@route('/index.html') | |
def index(): | |
return '<a href="/hello">Go to Hello World page</a>' | |
@route('/hello') | |
def hello(): |
augroup filetype_vim | |
autocmd! | |
autocmd FileType vim setlocal foldmethod=marker | |
augroup END | |
" Vim ESCAPE Combinations{{{ | |
imap jj <esc> | |
imap <S-Space> <Esc> | |
vnoremap <S-Space> <Esc> | |
" }}} |
import time | |
class RangeSensor: | |
def __init__(self): | |
pass | |
def make_generator(self): | |
t_end = time.time() + 0.1 | |
# tell sensor to start measurement |
import socket, machine | |
# This is the HTML, CSS and js to deliver to the client. | |
# You can (should) store this in another file and read from there, | |
# but I am lazy. | |
# The CSS and HTML to display pretty code is from pygments. | |
upy = """<!DOCTYPE html> | |
<html> | |
<head> | |
<title>I'm a website running on a Microcontroller.</title> |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import serial | |
fig, ax = plt.subplots() | |
line, = ax.plot(np.random.rand(10)) | |
ax.set_ylim(-5000, 5000) | |
xdata, ydata = [0]*100, [0]*100 | |
raw = serial.Serial("/dev/ttyUSB1",9600) |