Some sites I like
- Ana White
- Apartment Therapy
- Family Handyman
- Green Building Advisor
- Mr Money Mustache
- This Old House
- Tom Builds Stuff
My bookmarks:
| require 'phaxio' | |
| Phaxio.api_key = 'xxx' | |
| Phaxio.api_secret = 'xxx' | |
| class Fax | |
| def send_fax | |
| file = File.open("/path/to/document.pdf") | |
| to = 'tel:123-456-7890' | |
| fax = Phaxio::Fax.create(to: to, file: file) |
Some sites I like
My bookmarks:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <script src="//cdn.rawgit.com/bigeasy/timezone/master/src/timezone.js"></script> | |
| <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
| </head> | |
| <body> | |
| <h1>Time</h1> |
| #!/bin/bash | |
| case "$1" in | |
| production) environment=production; shift;; | |
| staging) environment=staging; shift;; | |
| * environment = staging;; | |
| esac | |
| case "$environment" in | |
| staging) app=my-app-staging;; |
| (function(angular, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['angular', 'ckeditor'], function(angular) { | |
| return factory(angular); | |
| }); | |
| } else { | |
| return factory(angular); | |
| } | |
| }(angular || null, function(angular) { | |
| var app = angular.module('ngCkeditor', []); |
Re: This tweet
Inlining, collection partials, helpers, or builder objects. Partials shouldn't be the only tool in your belt for reducing duplicated view code.
Depends on the situation.
| autocmd InsertEnter * syn clear EOLWS | syn match EOLWS excludenl /\s\+\%#\@!$/ | |
| autocmd InsertLeave * syn clear EOLWS | syn match EOLWS excludenl /\s\+$/ | |
| highlight EOLWS ctermbg=red guibg=red |
| #!/bin/bash -l | |
| export RACK_ENV="production" | |
| export RAILS_ENV="production" | |
| APP_PATH=/var/www/townstage | |
| CURRENT="$APP_PATH/releases/$(date +"%Y%m%d%H%M")" | |
| exit_with_error() { | |
| echo "Error..." |
| <script> | |
| (function() { | |
| var ts = document.createElement('script'), | |
| s = document.getElementsByTagName('script')[0]; | |
| ts.type = 'text/javascript'; | |
| ts.async = true; | |
| ts.src = 'http://townstage:3000/assets/widgets.js'; | |
| s.parentNode.insertBefore(ts, s); | |
| })(); | |
| </script> |