THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
#!/bin/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
module ReadMarkable | |
extend ActiveSupport::Concern | |
included do | |
has_many :read_marks | |
def touch_read_at | |
update_column(:read_at, Time.now) | |
end |
vundle_outdated() { | |
local -a outdated | |
for plugin in `find ~/.vim/bundle -maxdepth 1 -d 1`; | |
do | |
cd $plugin; | |
current=`git status | grep -c "Your branch is up-to-date with"`; | |
if [[ current -eq 0 ]] { | |
outdated+=$plugin; | |
} | |
cd ..; |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
grep -A 1 FoosController#create log/development.log |
// A Unit test template for Tape | |
// See 5 Questions every unit test must answer: | |
// https://medium.com/javascript-scene/what-every-unit-test-needs-f6cd34d9836d | |
import test from 'tape'; | |
test('What are you testing?', assert => { | |
const msg = 'what should it do?' | |
const actual = 'what was the output?'; |
// load as early as possible | |
if(process.env.NOW){ | |
require('dotenv').config({path:'./.envnow', silent:true}); | |
}else{ | |
require('dotenv').config({silent:true}); | |
} | |
// now you can deploy with: | |
//$cp .env .envnow && now && rm -r .envnow |