Skip to content

Instantly share code, notes, and snippets.

@rgardner
rgardner / osx-clean-install.md
Last active October 29, 2015 23:13 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences

most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

Step 1: Print!

print('Hello Nicole!')

Step 2: find events in email with open, variables, list

with open('email.txt', 'r') as email:
#!/usr/bin/env python3
# usage: meal_plans.py
import json
from selenium import webdriver
import time
# uncomment these lines to load your data from a file
#with open('config.json') as data_file:
@rgardner
rgardner / gist:b66b90d2a232a2fdfe86
Created October 4, 2015 16:07
El Capitan Fresh Install
# Fresh Install
## Before
1. Backup computer
2. Install El Capitan
## After
1. App Store
- download Xcode
2. Install MacVim
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bobgardner.stenography" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
@rgardner
rgardner / .gitignore
Created December 7, 2014 03:24
Initial files
# Android Studio #
##################
# Built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
def fibonacci(n, cache={}):
if n in cache:
return cache[n]
cache[n] = fibonacci[n-1] + fibonacci[n-2]
return cache[n]
@rgardner
rgardner / msft-interview.md
Created October 30, 2014 18:19
msft-interview

Microsoft Internship Advice from Maria

Initial

  • Good afternoon!
  • I'm from Redmond, WA and I study economics and computer science at NYU.

General

  • Smile!
  • Mention projects during interview questions!
@rgardner
rgardner / hw5.md
Last active August 29, 2015 14:07
def array_multiply(a):
    if len(a) == 2:
        return mul(a[0], a[1])
    else:
        return mul(array_multiply(a[0:len(a)/2], a[len(a)/2:len(a)]

Is that what you guys did? He said the algorithm was simple and to me this seems to work. I’m having a tough time with the tree though:

@rgardner
rgardner / post_event.json
Created September 21, 2014 23:45
Post an Event to the new Tech@NYU API!
{
"events": {
"title": "Tech@NYU After Hours #3",
"shortTitle": "After Hours #3",
"description": "After Hours is an event for designers, developers, and makers to get to know one another and work on cool projects. Students work on academic and extracurricular projects with a focus in entrepreneurial endeavours.",
"startDateTime": "2014-09-24T22:00:00.000Z",
"endDateTime": "2014-09-25T00:00:00.000Z",
"links": {
"teams": {
"ids": ["53f54dd98d1e62ff12539dc2"],