Skip to content

Instantly share code, notes, and snippets.

View seanwash's full-sized avatar
🏠
Working from home

Sean Washington seanwash

🏠
Working from home
View GitHub Profile
@seanwash
seanwash / docker_notes.md
Created January 18, 2016 14:33
Docker Notes
docss() {
 docker-machine restart default
 docs
}

docs() {
  echo "loading docker machine env"
  eval $(docker-machine env default)
 export DB_PORT_5432_TCP_ADDR=$(docker-machine ip default)

Keybase proof

I hereby claim:

  • I am seanwash on github.
  • I am seanwashbot (https://keybase.io/seanwashbot) on keybase.
  • I have a public key ASAzIYr4x-q_0Grt50K__uBnyeHXIDjAK9pSw7_7ZZxz0wo

To claim this, I am signing this object:

@seanwash
seanwash / db.rake
Created April 8, 2016 14:28 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@seanwash
seanwash / wp-snippets.php
Last active April 15, 2016 16:42
Wordpress Snippets
<?php // custom query loop ?>
<?php $counter = 0; $loop = new WP_Query(array('post_type' => 'capability', 'posts_per_page' => -1)); ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<div>
<?php the_title(); ?>
</div>
<?php endwhile; wp_reset_query(); ?>
@seanwash
seanwash / notes.md
Last active April 28, 2016 15:52
Node.js Notes

Organization

  • keep everything package related at the lowest level, package, readme etc.
  • everything else goes in something like /lib, for example: lib/ routes, actions, models, utils, etc
  • within those, and index file that gathers each main space and exports it. so i can require(‘./routes’) and use routes.difficulties.get()
@seanwash
seanwash / structure.md
Last active May 7, 2016 22:06
Hapi.js Structure
  • package.json
  • server.js - Kicks off server
  • app/routes - Contains all app routes (exercises/index.js, exercises/show.js)
  • app/views - any server side views (exercise/index.jade, exercises/show.jade)
  • models - Contains sequelize models
  • seeders - model seeds
  • config - config vars & such
  • public - Static assets
@seanwash
seanwash / brunch-config.js
Created June 18, 2016 23:44
Brunch config file for projects using basscss + responsive utilities
module.exports = {
// See http://brunch.io for documentation.
files: {
javascripts: {joinTo: 'app.js'},
stylesheets: {
joinTo: 'app.css',
order: {
before: [
'node_modules/basscss/css/basscss.css',
'node_modules/basscss-responsive-padding/css/responsive-padding.css',
› whois gethub.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: GETHUB.COM
Registrar: INAMES CO., LTD.
@seanwash
seanwash / node.sh
Created August 16, 2016 15:03 — forked from adamcbrewer/node.sh
NODE: Run a daemon node.js server and create virtualhost to forward all site traffic to the specified port.
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
@seanwash
seanwash / javascript-the-land-of-opportunity.md
Last active October 6, 2016 03:49
JavaScript – The Land of Opportunity
title JavaScript - The Land of Opportunity
date 2016-10-05 13:11:53 -0700
tags

JavaScript Fatigue - Everyone's talking about it and most of us have felt it in one way or another. While it often feels good to blow off some steam by writing satirical articles about the current state of the JavaScript ecosystem, dwelling on it too much in that light can become frustrating and discouraging for both yourself and for others. Although I'm not the first, I'd like to try to talk about JavaScript Fatigue in a different light.

JavaScript is a land of opportunity