$ rails g model User
belongs_to
has_one
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/sh | |
| # Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
| set -e | |
| # Must be a valid filename | |
| NAME=foo | |
| PIDFILE=/var/run/$NAME.pid | |
| #This is the command to be run, give the full pathname | |
| DAEMON=/usr/local/bin/bar |
| # Ruby Wishlist | |
| ## Removals | |
| * finalize! method for classes | |
| * Remove constant_finding/loading at runtime, it always breaks. | |
| ## Module.freeze | |
| Remove the ability to dynamically change code at runtime |
| #!/bin/bash | |
| cat $(find app/assets/stylesheets/ -type f) | | |
| grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// | | |
| while read CSS; do | |
| if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then | |
| echo $CSS >> unused.scss; | |
| fi | |
| done |
| #!/usr/bin/env python | |
| import cv2 | |
| import numpy as np | |
| def main(): | |
| cap = cv2.VideoCapture(0) | |
| while(cap.isOpened()): | |
| ret, img = cap.read() | |
| skinMask = HSVBin(img) |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"Thx to crxviewer for the magic download URL.