Screen Shot 2014-11-24 at 10.31.40 AM

Making curl + github easy / case sensitive github code search

Create a visible / easy to reuse token in https://github.com/settings/applications by storing the token in the application name.

Screen Shot 2014-11-24 at 10.31.40 AM

 

Use curl to search for code (notice the per-page 100) and grep case sensitive.


curl -s -H 'Accept: application/vnd.github.v3.text-match+json' --user "TOKEN_GOES_HERE:x-oauth-basic" 'https://api.github.com/search/code?per_page=100&page=3&q=user:YOURORG+SEARCHTERM' | grep 'SearchTERM'

 

Cleaning up unmanaged files in boxen / puppet

Nginx and env files .. maybe others … get a mess after a while of trying different branch, since they are never auto-cleaned up. Already made this into a PR, but nobody seems to care … so fix it via overwrites.

Add an empty directory as modules/ours/files/emptydir + .gitkeep (pick whatever you want for ‘ours’).

  # remove any unmanaged configs
  # https://github.com/boxen/puppet-nginx/pull/34
  File <| title == $nginx::config::configdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }

  File <| title == $nginx::config::sitesdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }

  File <| title == $boxen::config::envdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }