Skip to content

Instantly share code, notes, and snippets.

Avatar
Coffee.

Aubrey Taylor aubricus

Coffee.
View GitHub Profile
View gist:9902952
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
p.stdin.write('copy-text')
p.stdin.close()
@aubricus
aubricus / .bash_profile
Created May 30, 2014
virtualenvwrapper config
View .bash_profile
export WORKON_HOME=$HOME/.virtualenv
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
# If virtualenv wrapper exists in these locations...
venvwrappers[0]="/usr/local/share/python/virtualenvwrapper.sh"
venvwrappers[1]="$HOME/.virtualenv/default/bin/virtualenvwrapper.sh"
View base.html
<body>
<!-- code removed for brevity -->
<!-- require setup, do not delete -->
<script src="{{STATIC_URL}}/js/vendor/require.js"></script>
<script>
require(['{{STATIC_URL}}/js/common.js'], function(){
require(['main']);
});
View vagrant.py
# paths
base_path = "./"
config_path = "./config.rb"
@aubricus
aubricus / bourbon-neat-compass.sh
Created Aug 6, 2014
Install Bourbon & Neat, Compatible with Compass (i.e., SASS 3.2)
View bourbon-neat-compass.sh
gem install bourbon -v 3.2.3
gem install neat -v 1.5.1
@aubricus
aubricus / devbot-html-into-devbot-django.md
Last active Aug 29, 2015
Install Devbot HTML into Devbot Django Template
View devbot-html-into-devbot-django.md

How to Install Devbot HTML into Devbot-Django

  1. In a new directory, create a Devbot-Django Project
  2. In a new directory, create a Devbot-HTML Project
  3. Devbot-Django: Delete all things in /static
  4. Devbot-HTML > Devbot-Django: Copy all things in /src to /static
  5. Devbot-HTML > Devbot-Django: Copy /config.rb into the Devbot-Django project root
  6. Devbot-Django: Update new /config.rb, replace src/ with static/
  7. Devbot-Django: Update vagrant, fab css_watch task: see: https://gist.github.com/aubricus/72edfdba60c0a4b89d0c
  8. Devbot-Django: Index.html remove require include
@aubricus
aubricus / SassMeister-input-HTML.html
Created Sep 16, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="page">
<header>
<h1>Hello I'm The Header</h1>
</header>
<div class="hero">
<div class="one">
<h2>I'm by myself</h2>
</div>
<div class="two">
<div><h3>I'm 1</h3></div>
View _old_get_function.scss
@function get($dict, $key, $default: false) {
/* a python-style "get" function to emulate dictionary access in scss
param: $dict the dict you'd like to 'get' from
param: $key the 'key' to access
param: $default a default value to return should the 'get' fail
see:
- http://bit.ly/1cPvYXx
- http://stackoverflow.com/a/11041421
@aubricus
aubricus / SassMeister-input.scss
Created Mar 14, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@mixin foo($section){
.foo.#{$section} & {
@content;
}
}
@aubricus
aubricus / a-lazy-image-loader.js
Last active Oct 1, 2015
Lazy Image Loader: Quick draft of a lazy image loader using jQuery.
View a-lazy-image-loader.js
/**
* @name lazyImageLoader
* @description A quick implementation of a lazy loading technique for images.
* @returns object {"load": load} (see below)
*
* @param $imageList jquery selector List of images
* @param options object Configuration options
* - "queue_size" the size of the "queue" you'd like to load when loader.load() is called
* - "data_attr" the name of the data-attribute on your image tag; ex: "<img data-src="http://placehold.it/10x10 />"
*/