Skip to content

Instantly share code, notes, and snippets.

View epan's full-sized avatar

Eric Pan epan

View GitHub Profile
@epan
epan / person-test.html
Created November 15, 2012 23:50
onclick event should go back to referring page
<html>
<head>
<meta charset="utf-8">
<title>OceanRails Proto</title>
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
<meta name="apple-mobile-web-app-capable" content="yes">
@epan
epan / shop_v1
Created April 16, 2014 22:20
Celery v1 Shop Button CSS
<style>
a.btn.btn-green, button.btn.btn-green, button[type=submit].btn-green, button[type=reset].btn-green {
background: #3aa63b;
color: #fff;
border-color: #333;
}
button.btn.btn-green:hover {
background: #51c252;
}
a.btn, button.btn, button[type=submit], button[type=reset] {
@epan
epan / gist:8bfe5f0899da6a607d2e
Created May 2, 2014 08:09
pset 2 vigenere checking argument
// Allows only 1 keyword
if (argc != 2)
{
return 1;
}
ciphertext = argv[1];
cipherlength = strlen(ciphertext);
// Rejects ciphers with non-alpha content
@epan
epan / warmup_day_2.rb
Created January 26, 2017 03:10
Warmup Day 2
# Rubyify
# ----------------------------------------
# Define a method that turns regular sentences into (really bad and
# super long) ruby method names.
def rubyify(sentence)
#result = ""
result = sentence.downcase
array = result.split
result = array.join("_")
@epan
epan / keybase.md
Created February 24, 2017 23:17
verifying keybase for epan

Keybase proof

I hereby claim:

  • I am epan on github.
  • I am epan (https://keybase.io/epan) on keybase.
  • I have a public key ASC8ktve_3B_9I-ArJW0ewr8i6Ns7zJ4x6wXFHgyn3x7xgo

To claim this, I am signing this object:

@epan
epan / .bash_profile
Created March 2, 2017 00:33 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management

Introduction to Higher-Order Functions

Lessons

Slides 1

Slides 2

Two Forms of Functions

@epan
epan / solution.js
Created May 30, 2017 17:06
Double Vowels
// THE PROBLEM
// ----------------------------------
// https://gist.github.com/tim-hr/3bae7341ca7e566748c13726964d8535
// I: 1 array of 1 char per index
// O: 1 array like the Inut but with each vowel duplicated
// C: No add'l data structures. O(n)
// E: None yet
// PLAN
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@epan
epan / .hyper.js
Last active August 23, 2017 21:21
hyper terminal sync settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks