This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_author(context) | |
context[:author].present? && news[:author].to_i != 0 ? @authors[context[:author].to_i][:email] : nil | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bigger, easy to debug | |
def find_author(context) | |
context = context.to_i | |
return if context.zero? | |
author = @authors.fetch(context) | |
return unless !!author | |
author.fetch(:email) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2014/RSS/mp4high")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + "-" + $_.creator + ".mp4" | |
if (!(test-path $file)) | |
{ | |
$file | |
$wc = (New-Object System.Net.WebClient) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yo. |