Skip to content

Instantly share code, notes, and snippets.

View metaskills's full-sized avatar
🐙
Being Inkcellent to Each Other

Ken Collins metaskills

🐙
Being Inkcellent to Each Other
View GitHub Profile
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@searls
searls / gist:a644a89017022912b2c6
Last active August 29, 2015 14:11
Some thoughts on small teams and headquarters HQs

This is a simple little note I wrote down when talking to another company owner on the topic of moving a fully distributed team (with some folks in the same city) to a mostly-distributed team with an HQ office in a single city. It's not necessarily useful as general advice beyond that

why thoughtful physical location matters

I often advise clients that are actively focused on improving their teams to either embrace a fully-distributed team or a fully-colocated one, and to avoid other permutations of organization. Patterns that I see a lot:

  • small satellite offices off a large HQ
  • a handful of remote folk off a large HQ
  • n similarly-sized engineering offices
@searls
searls / instructions.md
Created May 2, 2014 12:05
Creating a USB install disk of OS X Mavericks

Apple has changed how it distributes OS X Mavericks since its initial release in October 2013. This note was written on May 2, 2014. This affects the instructions you'll find online for how to make a bootable OS X installer.

It used to be that when you downloaded OS X from the App Store, the entire 5GB installer was placed in /Applications/Install OS X Mavericks.app. Now, there is a simple shortcut program placed in /Applications/OS X Mavericks.app. The app file is immediately removed in the event of an error or a successful post-install launch. When the download succeeds, the app file is launched which brings up the traditional install wizard, but this time mounted to /Volumes/Install OS X Mavericks.

I actually discovered this because if you already have a volume mounted of the same name (which I did, because I was trying to update my existing USB installer), the App Store download promptly fails right after finishing its download.

So if you have an empty disk you'd like to use as an installer that'

@metaskills
metaskills / info.md
Last active July 26, 2016 23:16
Sassmeister Presenter Bookmarklets

Presenter Mode

This bookmarklet will put Sassmeister into presenter mode. I used it for screenshots for my talk.

javascript:(function(){var%20h,m,f;h=$('.site_header'),m=$('.main_body'),f=$('footer');if(h.is(':visible')){h.hide();m.css({top:0,bottom:0});f.hide();}else{h.show();m.css({top:'3.33333em',bottom:'1.77778em'});f.show()}}());

presenter-mode

Presenter Mode Zoomed

Reciprocal Needs in the Employment Relation

We can look at two sides of the management coin: What do the individuals get out of it? And what benefit does the whole system derive from it?

I will disregard any benefits that accrue to managers just by holding the position of managing. Those are just circular logic. Circular logic abounds in discussions of management and hierarchy. For example, consider status reports. It will be said that status reports are necessary so managers know what their employees are working on. It’s

@metaskills
metaskills / clean.sh
Last active January 4, 2016 01:08
OS X Command To Clean All Whitespace From A Rails Project
find app config db spec test -type f -name '*.rb' -or -name '*.coffee' -or -name '*.erb' -or -name '*.jbuilder' -or -name '*.js' | xargs sed -i '' -E "s/[[:space:]]*$//" | xargs sed -i -E '$a\'
@stevenharman
stevenharman / _angularjs_and_rails_asset_pipeline.md
Last active April 30, 2016 23:20
Load the Angular.js $templateCache while building assets for Rails Asset Pipeline. Be sure in require the `templates` module as a dependency of your Angular.js app.

AngularJS + Rails Asset Pipeline

This is my hand-rolled solution for getting Angular assets (Controllers, Models, Directives, Templates, etc.) integrated into the Rails Asset Pipeline.

Templates and the $templateCache

Of particular note: this hack will also load the AngularJS $templateCache with your templates, while allowing you to use Slim, ERB, etc. to write your templates.

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@maccman
maccman / jquery.ajax.queue.coffee
Last active January 13, 2018 12:03
Queueing jQuery Ajax requests. Usage $.ajax({queue: true})
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->
@ebeigarts
ebeigarts / RAILS_RELATIVE_URL_ROOT.md
Last active February 2, 2023 15:16
RAILS_RELATIVE_URL_ROOT

RAILS_RELATIVE_URL_ROOT

Rails

By default RAILS_RELATIVE_URL_ROOT is used only for asset pipeline.

To namespace your rails routes you need to wrap run MyApp::Application with map in your config.ru:

map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do