Skip to content

Instantly share code, notes, and snippets.

View pamo's full-sized avatar

Pamela Ocampo pamo

View GitHub Profile
@pamo
pamo / fixpython.sh
Created November 17, 2013 05:12
Fix Python virtualenv on OS X Mavericks
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo rm distribute_setup.py
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
@pamo
pamo / keybase.md
Last active October 12, 2015 08:02
keybase.md

Keybase proof

I hereby claim:

  • I am pamo on github.
  • I am pamo (https://keybase.io/pamo) on keybase.
  • I have a public key whose fingerprint is 10FA 0C3B 3174 7EF5 27F7 2AB8 B97D C3E4 B12C BB74

To claim this, I am signing this object:

@pamo
pamo / colors.sh
Last active February 10, 2022 04:46
WWC Bash Prompt Customizaton
##### COLORS #####
NO_COLOR="\[\033[0m\]"
LIGHT_WHITE="\[\033[1;37m\]"
WHITE="\[\033[0;37m\]"
GRAY="\[\033[1;30m\]"
BLACK="\[\033[0;30m\]"
RED="\[\033[0;31m\]"
LIGHT_RED="\[\033[1;31m\]"
GREEN="\[\033[0;32m\]"
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/usr/bin/clang -o context.o -c -Os -w -pipe -march=native -mmacosx-version-min=10.10 -arch i386 -arch x86_64 -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -O2 -dynamic -DNDEBUG -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -DSERF_HAVE_GSSAPI -I. -I/usr/include/apr-1 -I/usr/local/opt/openssl/include context.c
/usr/bin/clang -o incoming.o -c -Os -w -pipe -march=native -mmacosx-version-min=10.10 -arch i386 -arch x86_64 -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -O2 -dynamic -DNDEBUG -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -DSERF_HAVE_GSSAPI -I. -I/usr/include/apr-1 -I/usr/local/opt/openssl/include incoming.c
/usr/bin/clang -o outgoing.o -c -Os -w -pipe -march=native -mmacosx-version-min=10.10 -arch i386 -arch x86_64 -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -O2 -dynamic -DNDEBUG -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_1
@pamo
pamo / ReadNext.js
Created March 6, 2016 06:14
ReadNext react component
import React from 'react'
import { Link } from 'react-router'
import { link } from 'gatsby-helpers'
import { prune, include as includes } from 'underscore.string'
import { find, findIndex } from 'lodash'
import { rhythm, fontSizeToMS } from 'utils/typography'
class ReadNext extends React.Component {
render () {
const { pages, post } = this.props
@pamo
pamo / SimpleHTTPServer.sh
Created April 24, 2016 22:55
bash server function
server ()
{
local port="${1:-8000}";
sleep 1 && open "http://localhost:${port}/" & python -c 'import SimpleHTTPServer;
map = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;
map[""] = "text/plain";
for key, value in map.items():
map[key] = value + ";charset=UTF-8";
SimpleHTTPServer.test();' "$port"
}
@pamo
pamo / windows-dev
Last active November 30, 2016 01:07 — forked from andersonvom/boxstarter-windev.ps1
BoxStarter .NET development box
# Open Internet Explorer and run the raw version of this url as the query parameter to BoxStarter's launcher:
# http://boxstarter.org/package/nr/url?<raw-version-of-this-gist>
# More Info: http://boxstarter.org/WebLauncher
# Configure Windows
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Update-ExecutionPolicy Unrestricted
cinst -y Microsoft-Hyper-V-All -source windowsFeatures
@pamo
pamo / config.yml
Created July 15, 2017 03:28
CircleCI 2.0 Workflows
defaults: &defaults
working_directory: ~/app
docker:
- image: circleci/node:8.1.4-browsers
version: 2
jobs:
build:
<<: *defaults
steps:
@pamo
pamo / .cvimrc
Last active February 12, 2018 19:12
cvim config
" Settings
let barposition = "bottom"
" alias ':g' to ':tabnew google'
command g tabnew google
let completionengines = ["google", "amazon", "imdb"]
let searchalias g = "google" " Create a shortcut for search engines.
" For example, typing ':tabnew g example'
@pamo
pamo / githubwiki.md
Created July 18, 2018 21:23
Git Tweaks

Displaying Git Branch in Console Prompt

If you'd like your terminal prompt to display your current Git branch in a nice format, the following is an excerpt from my .bash_login:

###############
# Custom prompt:

function find_git_branch {
  local dir=. head