Skip to content

Instantly share code, notes, and snippets.

View dzt's full-sized avatar
🛹

Peter Soboyejo dzt

🛹
  • Worcester, Massachusetts
View GitHub Profile
@msafadieh
msafadieh / circles.rkt
Last active August 23, 2019 15:57
more cool racket graphics
#lang racket
(require 2htdp/image)
(require 2htdp/universe)
;; structure used
(struct crcl (radius color))
;; constants
(define SIZE 500)
from datetime import date, datetime, timedelta
birthdays = {
'George Washington': date(1732, 2, 22),
' John Adams': date(1735, 10, 30),
'Thomas Jefferson': date(1743, 4, 13),
'James Madison': date(1751, 3, 16),
'James Monroe': date(1758, 4, 28),
'Andrew Jackson': date(1767, 3, 15),
'John Quincy Adams': date(1767, 7, 11),

Common App & Stanford Essays

The following are my responses to the main Common App essay and the Stanford application questions. You're welcome to read them to try and understand how I got "in" to Stanford, or just for fun. Whatever you choose to try and take away from these essays, I hope you get something out of them. Or nothing at all, that works too. Enjoy.

A Brief Note

There's no secret formula. There are a lot of people more qualified than me that got denied. Even though they may have been more qualified, I beat them when it came to the essays. The most important part of your application is your essays, so I would encourage you to spend a lot of time on them. Spend time reflecting on who you are and how you can use your essays to communicate that. The readers of the over 40,000 Stanford applicants know a fake essay from a mile away. If you want to have a chance at admission, your essays need to be 100% authentic you, not 90% authentic you and 10% your mom/tutor/fake self.

If you plan to apply, I

@nebiros
nebiros / gist:9196645
Last active January 8, 2019 05:10
Send Push Notifications from node.js with Parse.com SDK
var Parse = require("parse").Parse;
Parse.initialize(
"", // applicationId
"", // javaScriptKey
"" // masterKey
);
var query = new Parse.Query(Parse.Installation)
, data = {
@nadeesha
nadeesha / proxy.js
Last active July 28, 2017 06:15
Node-based http/https proxy to forego the pain of configuring iptables for one-off dev tasks. Not recommended to be used in prod environments.
var fs = require('fs'),
http = require('http'),
https = require('https'),
httpProxy = require('http-proxy');
var isHttps = true; // do you want a https proxy?
var options = {
https: {
key: fs.readFileSync('key.pem'),
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@nerdsrescueme
nerdsrescueme / regex.txt
Created September 23, 2011 16:08
Common Regex
Perl and PHP Regular Expressions
PHP regexes are based on the PCRE (Perl-Compatible Regular Expressions), so any regexp that works for one should be compatible with the other or any other language that makes use of the PCRE format. Here are some commonly needed regular expressions for both PHP and Perl. Each regex will be in string format and will include delimiters.
All Major Credit Cards
This regular expression will validate all major credit cards: American Express (Amex), Discover, Mastercard, and Visa.
//All major credit cards regex
'/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|622((12[6-9]|1[3-9][0-9])|([2-8][0-9][0-9])|(9(([0-1][0-9])|(2[0-5]))))[0-9]{10}|64[4-9][0-9]{13}|65[0-9]{14}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})*$/'