Skip to content

Instantly share code, notes, and snippets.

View robbintt's full-sized avatar
🎯
Focusing

Trent Robbins robbintt

🎯
Focusing
  • San Francisco, CA
View GitHub Profile

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

@robbintt
robbintt / getwp.sh
Created June 16, 2014 22:58
Install WordPress, MySQL DB, Roots.
#!/bin/bash
: '
Complete command line script for a new wordpress install.
You must still build an APACHE VIRTUALHOST
$ ./getwp.sh example.taui.io ex-admin
Arguments:
1 - webpage, example.taui.io
# -*- coding: utf-8 -*-
"""
Flask-Login example
===================
This is a small application that provides a trivial demonstration of
Flask-Login, including remember me functionality.
:copyright: (C) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
"""
@robbintt
robbintt / pythonthreadingexample
Created June 20, 2015 00:38
python threading example
import threading
import Queue
import time
import fileinput
import sys
validated_stdin = Queue.Queue()
@robbintt
robbintt / .vimrc
Last active September 16, 2016 08:59
Toggle tab size in .vimrc with <f3>. If you start in some other mode, you'll probably want to set the customtabsize state of your TabToggle() function to that mode.
" Apparently some vim environments require colons before commands in
" .vimrc and others don't. This file has been primarily tested in
" Ubuntu 12.04, 13.10, and 14.04 environments, where a : is required
" on each line before a command. According to one stackexchange topic
" it is best to leave the leading colons because systems that do not
" require them can still execute them.
" Author - Trent Robbins
" Turn arrow keys off:
" To cycle history in `ed` mode, use C-n and C-p (although up and down might work fine)
@robbintt
robbintt / gist:60d6f72ffe80c753b571
Created September 8, 2015 00:49
.pyc vs .py checker
"""
Check .pyc files against .py files in a directory and all its descendants to see if any pyc files do not have their accompanying py files.
To get input for this, run the command:
find . -regex .*pyc? > checker.txt
Check if the line ends in pyc.
If it does, check if there is a line that is the same without the c.
If not, print the pyc line.
@robbintt
robbintt / gulpfile.js
Last active April 5, 2019 07:20 — forked from gabrielhpugliese/gulpfile.js
Django collectstatic + Gulp watch
var gulp = require('gulp');
// Run shell commands with exec:
// https://www.npmjs.com/package/gulp-exec
var exec = require('child_process').exec;
// collectstatic task for Django
// https://www.npmjs.com/package/gulp-exec
gulp.task('collectstatic', function (cb) {
exec('python ../../manage.py collectstatic -i node_modules -i bower_components --noinput', function (err, stdout, stderr) {
@robbintt
robbintt / threading_sample.py
Last active November 17, 2015 17:46
Python Threading Sample
"""
placeholder docstring
"""
import threading
import time
import random
def waitsome(n):
""" wait some time
"""
@robbintt
robbintt / request_threading.py
Created November 24, 2015 05:06
an example of threading requests
"""
Specification for retrieve_data:
If 200 is the status code, return the json object
If not, return an error
instead of subclassing Thread to store the data, we've used a global variable.
avoiding objects for now to keep everything accessible.
"""
import time
import threading
@robbintt
robbintt / 2015-reading.txt
Last active December 5, 2015 07:59
My Reading Habits (A review of 2015)
Greatest Hits of 2015:
Nonviolent Communication
The Three Body Problem
Cloud Atlas
The E-myth Revisited
Cryptonomicon
The Information: A History, a Theory, a Flood
The Martian
True Names
The Wizard of Earthsea