This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type T struct { | |
Thing string | |
} | |
func (t *T) Set(thing string) { | |
t.Thing = thing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $EUID != 0 ]; then | |
echo "It's a weird tree." | |
else | |
echo ' _ __' | |
echo ' / `\ (~._ ./ )' | |
echo ' \__/ __`-_\__/ ./' | |
echo ' _ \ \/ \ \ |_ __' | |
echo ' ( ) \__/ -^ \ / \' | |
echo ' \_/ " \ | o o |.. / __' | |
echo " \\. --' ==== / || / \\ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; from https://www.youtube.com/watch?v=r6j2W5DZRtA | |
;; get the following packages ("M-x package-list-packages"): | |
;; go-mode | |
;; go-eldoc | |
;; company-mode | |
;; company-go | |
;; get the following go programs (run each line in your shell): | |
;; go get golang.org/x/tools/cmd/godoc | |
;; go get golang.org/x/tools/cmd/goimports | |
;; go get github.com/rogpeppe/godef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This might seem silly, but one of my favorite activities is analyzing my | |
musical taste and my favorite bands. | |
Radiohead is one of my absolute favorite bands, and I've been listening to them | |
since I was a Freshman in high school. Radiohead has an interesting record as a | |
rock band. They started out as a lite-grunge outfit, developed a more mature | |
style and released an album at their height that combined the noises of | |
Kraftwerk with their alternative rock roots. Then, as they were being hailed as | |
the saviors of rock, they shocked the world by releasing two electronica | |
albums. They returned to a guitar-based sound for their next two albums, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Sort set of courses in decreasing order (latest date first) | |
;; Easiest way to evaluate: paste the code in an emacs buffer. Change the mode | |
;; to lisp-interaction-mode. Go to the end of "setq courses" and type C-x C-e | |
;; (eval-last-sexp), go to the end of "defun course-sort" and type C-x C-e, | |
;; and then go to the end of "course-sort courses" and type C-j. The sorted | |
;; list will print out below the command inside the buffer. | |
(setq courses '("16 Oct 2013 - Circuits 1: https://www.edx.org/course/mitx/mitx-6-002x-circuits-electronics-1130" | |
"7 Oct 2013 - 3d Graphics: https://www.edx.org/course/uc-berkeleyx/uc-berkeleyx-cs-184-1x-foundations-1003" | |
"7 Jan 2014 - Principles of Econ: https://www.edx.org/course/caltechx/caltechx-ec1011x-principles-economics-1286" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html class="no-js"> | |
<head> | |
<title>Users</title> | |
<link rel="stylesheet" type="text/css" href="stylesheets/base.css"> | |
<link rel="stylesheet" type="text/css" href="stylesheets/home.css"> | |
<link type="image/png" rel="SHORTCUT ICON" href="images/trophy.png"> | |
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'> | |
<link href='http://fonts.googleapis.com/css?family=Bitter:700' rel='stylesheet' type='text/css'> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') // imports express | |
, routes = require('./routes') // imports routes | |
, mongoose = require('mongoose') // imports mongoose | |
, crypto = require('crypto') // imports crypto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (sqrt x) | |
(define (average lhs rhs) | |
(/ (+ lhs rhs) 2)) | |
(define (good-enough? guess) | |
(< (abs (- (square guess) x)) .0001)) | |
(define (improve guess) | |
(average guess (/ x guess))) | |
(define (try guess) | |
(if (good-enough? guess) | |
guess |