Skip to content

Instantly share code, notes, and snippets.

microservice party

Daniel Pritchett ⚡ dpritchett

microservice party
View GitHub Profile
View downloadBuild2014Videos.ps1
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)
$a = ([xml]$rss.downloadstring(""))
$ | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + "-" + $_.creator + ".mp4"
if (!(test-path $file))
$wc = (New-Object System.Net.WebClient)
View gist:8419942
class FranchiseeRequest < ActiveRecord:: Base
attr_accessor :skip_region_validation
attr_accessor :skip_region_validation, as: :import
validate :expanding_into_region, unless: !!ENV["IMPORT_HAX_LOL"]
def expanding_into_region
raise error if franchise is not expanding into current region
View gist:8338838
# bigger, easy to debug
def find_author(context)
context = context.to_i
return if
author = @authors.fetch(context)
return unless !!author
View gist:8338490
def find_author(context)
context[:author].present? && news[:author].to_i != 0 ? @authors[context[:author].to_i][:email] : nil
View git-publish
#!/usr/bin/env ruby
cmds = []
cmds << "git co gh-pages"
cmds << "git merge master"
cmds << "git push origin gh-pages"
cmds << "git co master"
cmds << "git push origin master"
cmds << "git push joyent master"