Skip to content

Instantly share code, notes, and snippets.

@judsonmitchell
judsonmitchell / nodeServer.md
Last active December 28, 2015 08:08
Start as simple web server using node.
npm install connect

Create file server.js

var connect = require('connect');
connect.createServer(
 connect.static(__dirname)
body {
padding: 0;
margin: 0;
background: #3FA8C6;
background-image: -moz-linear-gradient(top, #3fa8c6 0%, #3fa8c6 0%, #399ab2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3fa8c6), color-stop(0%,#3fa8c6), color-stop(100%,#399ab2));
background-image: -webkit-linear-gradient(top, #3fa8c6 0%,#3fa8c6 0%,#399ab2 100%);
background-image: -o-linear-gradient(top, #3fa8c6 0%,#3fa8c6 0%,#399ab2 100%);
background-image: -ms-linear-gradient(top, #3fa8c6 0%,#3fa8c6 0%,#399ab2 100%);
" Console log from insert mode; Puts focus inside parentheses
imap cll console.log();<Esc>==f(a
" Console log from visual mode on next line, puts visual selection inside parentheses
vmap cll yocll<Esc>p
" Console log from normal mode, inserted on next line with word your on inside parentheses
nmap cll yiwocll<Esc>p
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<meta charset="utf-8">
<title>Good Time Calculator</title>
</head>
<body>
@judsonmitchell
judsonmitchell / 0_reuse_code.js
Created February 16, 2014 15:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@judsonmitchell
judsonmitchell / developing_apps_on_chromebook.md
Last active December 22, 2022 16:39
A quick guide to developing Android and iOS apps using only a Chromebook.

How I Develop iOS and Android Apps Using a Chromebook.

(Current as of July, 2014)

I'm a Chromebook fanboy, I admit it. I had one of the first CR-48s and am now happily possessed of an Acer C720. I use it for everything, from writing legal briefs to developing apps, and I am thoroughly satisfied with it.

Mobile App development on a CB poses some special issues, however. Most developers have dedicated OS-specific machines to develop mobile apps (on iOS this is almost a requirement), but I simply refuse to buy an Apple computer just to create a mobile app. After much trial and error, I have found it possible, even enjoyable, to create apps on my CB. Here's how I do it.

1. Preparing the Chromebook

@judsonmitchell
judsonmitchell / index.js
Created September 2, 2014 13:49
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@judsonmitchell
judsonmitchell / dorenkamp-index.html
Last active August 29, 2015 14:14
Fixes to Donald Dorenkamp's html homework
<html>
<head>
<meta charset="utf-8">
<title>Js Bin</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<h1> Law School Clinic </h1>
<h2> By Donnie Dorenkamp </h2>
<h3> Clinic Assignment </h3>
@judsonmitchell
judsonmitchell / style.css
Last active August 29, 2015 14:14
Dorenkamp's css file as submitted
P {color: red;
font-family:arial;
font-size:18pt;
text-align:justify;
}
textarea {height: 20px; width:40px; border: 5px solid blue}