Skip to content

Instantly share code, notes, and snippets.

View bradobro's full-sized avatar
🌲

Brad Olson bradobro

🌲
View GitHub Profile
@bradobro
bradobro / lessq.fish
Last active January 18, 2017 19:39
Fish functions for watching files with less
# You can use `funced` to edit these or just run this script.
# If you want them there for you next time, be sure to `funcsave` them
function lessq --description 'View github.com/y0ssar1an/q go debug logs'
set fname {$TMPDIR}q
echo 'q.Q watcher help: ^C to browse, F to resume following' > $fname
less -R +F $fname
end
function lessw --description 'Like tail -f but with less powers. ^C to scroll and search. F to resume watching.' --argument fname
@bradobro
bradobro / ReactStyleExample.coffee
Created May 19, 2015 14:32
A lightweight, versatile way to override styles client-side with react
H = React.Dom
H.div className: "page-wrapper",
H.style null,
"""
.header-section {background: red !important;}
.primary-action {background: red !important;}
.primary-action:hover, .primary-action.hover {border: 1px solid red !important;}
"""
// This module loads a config file in the current working directory matching the NODE_ENV variable.
// I.e. either './development.js' or './production.js' based on the process.env.NODE_ENV variable.
// If not set, it defaults to './development.js'.
// Can load custom environment files as well, as long as the NODE_ENV variable matches
// a file in the current directory. E.g. './staging.js'
// Usage: calling code can just require this module, e.g. "var config = require('./config')"
// assuming this file is named "index.js" and lives in a subdirectory named "config" of the app root.
var config
, config_file = './' + (process.env.NODE_ENV ? process.env.NODE_ENV : 'development') + '.js';