Skip to content

Instantly share code, notes, and snippets.

View bradbaris's full-sized avatar

Brad Baris bradbaris

View GitHub Profile
@bradbaris
bradbaris / README.md
Last active August 29, 2015 14:15 — forked from theRemix/README.md

Gulp + Sass + LiveReload + Foundation

Goals

To have a gulp workflow that with a single process,

  1. watches for any sass changes, then compiles sass source into css
  2. watches for any changes in the public directory, triggers live-reload
  3. serves your static content in public/

#tl;dr

git remote add [maintainer's name] [paste URL here]
git fetch 
git branch --track [maintainer's name]_[branch] [remote name from step 2]/[branch you want to track]
git checkout [maintainer's name]_[branch]
git pull
git checkout master
git merge [maintainer's name]_[branch]
@bradbaris
bradbaris / javascript-for-vim-refactoring.js
Last active September 21, 2015 22:58 — forked from derwiki/javascript-for-vim-refactoring.js
Moving faster with Vim (5-minute lightning talk presentation). I wasn't inspired to learn effective command of Vim until I saw some people flying around faster than I thought was possible. The goal of this presentation is to call out how slow "normal" text editing is, and how many keystrokes can be reduced by using increasingly more terse Vim co…
$(function() {
// good opportunity to combine into a single statement
// qq w cw <esc> A, <esc> 0 j q
var a = 10;
var b = 20;
var c = 30;
var d = 40;
var e = 50;
// opportunity to simplify syntax
@bradbaris
bradbaris / Setup.md
Created November 23, 2015 09:08 — forked from suvozy/Setup.md
Setup AWS EC2 and RDS (php5.5, apache2.4, mysql5.5, phpmyadmin)
@bradbaris
bradbaris / gulpfile.js
Created March 7, 2016 01:42 — forked from plasticbrain/gulpfile.js
gulp.js task to deploy code to remote servers
/*******************************************************************************
* Description:
*
* Gulp file to push changes to remote servers (eg: staging/production)
*
* Usage:
*
* gulp deploy --target
*
* Examples:
@bradbaris
bradbaris / gist:5a4c833f9507efd1ad68
Created March 26, 2016 05:55 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

Keybase proof

I hereby claim:

  • I am bradbaris on github.
  • I am bradbaris (https://keybase.io/bradbaris) on keybase.
  • I have a public key ASBR_gakC-_5WwuDbioAWsohPJKMdWuE10gp0Krb7Bfx4Ao

To claim this, I am signing this object:

@bradbaris
bradbaris / .profile
Last active April 19, 2016 18:40 — forked from yoshuawuyts/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@bradbaris
bradbaris / image-to-ansi.py
Last active May 3, 2016 10:18 — forked from klange/image-to-ansi.py
Convert images to ANSI escape sequences
#! /usr/bin/env python
""" Convert an image (argv[1]) to an ANSI text string (xterm-256color)
Original readme from colortrans.py follows:
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
/**
* @fileoverview Utility functions related to the user agent.
*/
function isIOS() {
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
}