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 | |
CHARACTERS = (('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a) | |
GROUP = 53 | |
MY_MACHINE_DYNDNS_ADDRESS = "Put your DynDns DNS name here" | |
MY_SSH_PORT = "Your router's external port that will forward to SSH" # as a Fixnum | |
def ridiculous_password | |
(1..20).map do |
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 Utils { | |
escapeRegex(s) { | |
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); | |
} | |
} |
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 User < ActiveRecord::Base | |
# ... lots of persistence stuff | |
end | |
class GitHubUserProvisioner < SimpleDelegator | |
def provision_with!(user_info, extra_user_hash) | |
self.github_login = extra_user_hash['login'] | |
self.name = user_info['name'] | |
self.email = user_info['email'] | |
self.github_url = user_info['urls']['GitHub'] |
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
// I won't pretend that this is lovely code... | |
class EDate { | |
date = null; | |
vacation = false; | |
setVacation(v) { | |
this.vacation = v; | |
} | |
// HI SET THIS!!! |
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
/** | |
"Project tags" just means "any markdown task that that share a tag but separates the tasks | |
identifier/position in the flow followed by the identifiers of the identifiers/positions of | |
nodes with edges that point to this node. In this way, the tags allow the tasks to remain | |
sortable by their flow step identifier thusly: | |
#project/1 step 1 description | |
#project/2a/1 step 2a description | |
#project/2b/1 etc |
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
Evan's Foolproof Deep Dish | |
★★★★★ | |
Pizza | |
Prep Time: 30 mins. to 50 mins. | Cook Time: 35 mins. to 30 mins. | Difficulty: Medium | Servings: 8 | |
Ingredients: | |
CRUST | |
4 cups King Arthur Unbleached All-Purpose Flour | |
3 tablespoons yellow cornmeal | |
1 3/4 teaspoons salt |
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
Mountain West Ruby Conf | |
Golden Gate Ruby Conf | |
Ruby Nation | |
Gotham Ruby Conf | |
Windy City Rails | |
Madison+ Ruby | |
Rocky Mountain Ruby | |
Lone Star Ruby (next held in 2015?) | |
Ruby DCamp | |
Cascadia Ruby |
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
module API::Clients | |
class DnsManager < Base | |
def initialize(url) | |
headers = { | |
"Accept" => "application/json", | |
"Content-Type" => "application/json", | |
"Request-Id" => API::RequestStore.request_ids, | |
"X-Request-Id" => API::RequestStore.request_id, | |
} | |
super(url, "heroku-dns-manager", headers: headers) |
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 params(action:, domain:, target:, type:) | |
body = { | |
change: { | |
:action => action, | |
"resource-record-set" => { | |
:name => domain | |
} | |
} | |
}.tap do |b| | |
case type |
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
require 'json' | |
cert=File.read('cert.pem') | |
key=File.read('key.pem') | |
app = "afternoon-citadel-7280" | |
body = { | |
app: { id: app }, | |
certificate_chain: cert, | |
private_key: key |
NewerOlder