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
brew install dnsmasq | |
CONFIG_FILE="$(brew --prefix)/etc/dnsmasq.conf" | |
sudo mkdir -p /etc/resolver | |
sed -i 's/#strict-order/strict-order/g' $CONFIG_FILE | |
grep -q -F 'address=/.fml/127.0.0.1' $CONFIG_FILE || echo 'address=/.fml/127.0.0.1' >> $CONFIG_FILE | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/fml' |
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
variable "aws_access_key" { default = "x" } | |
variable "aws_secret_key" { default = "x" } | |
# Should be given via command line | |
variable "branch" {} | |
variable "aws_region" { | |
default = "eu-central-1" | |
} | |
variable "r53_staging_zone_id" { |
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 HealthCheck | |
class << self | |
def run(port: 8000) | |
self.new(port: port).run | |
end | |
def background(port: 8000) | |
self.new(port: port).background | |
end | |
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
#!/usr/bin/env ruby | |
# Setenv | |
# TODO: Find something better for this.. | |
# TODO: Find a way to get the project name | |
# TODO: Rename to pre-recieve? | |
HOME = "/Users/dhiemstra/Projects/docker/builder/local" | |
BIN_PATH = "#{HOME}/bin" | |
REPOS_PATH = "#{HOME}/repos" | |
BUILDS_PATH = "#{HOME}/builds" |
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
0.10552698199171573 active_support | |
0.10818373601068743 active_support/time | |
0.11088466799992602 arel | |
0.11277171300025657 haml | |
0.11378979800792877 active_support/core_ext/hash/conversions | |
0.1375656950112898 active_support/core_ext/object/conversions | |
0.1413851780089317 nokogiri | |
0.14352535500074737 byebug/commands | |
0.14591897900390904 mail | |
0.14936679700622335 action_controller/base |
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
export default { | |
// Simple | |
'dashboard.hello': 'Hello world', | |
// nested | |
'button': { | |
'add_user': { | |
'title': 'Add a user', | |
'text': 'Add', | |
'disabled': 'Saving...' |
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
› dig em.dannyhiemstra.com | |
; <<>> DiG 9.8.3-P1 <<>> em.dannyhiemstra.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12643 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;em.dannyhiemstra.com. IN A |
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
# notify appsignal | |
args = "--revision=#{config.active_revision} --user=#{config.deployed_by} --environment=#{config.environment_name}" | |
run "cd #{config.current_path} && bin/bundle exec appsignal notify_of_deploy #{args}" |
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
APP_NAME='..' | |
PATH="/data/#{APP_NAME}/current" | |
namespace :ey do | |
desc "Open production rails console" | |
task :console do | |
exec "ey ssh -t 'cd #{PATH} && bin/rails console production'" | |
end | |
desc "Open production psql command" |
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
# Public: Returns an optimized hash object for mobile representation of weekly activities. | |
# | |
# The returned hash would look like this {"Monday" => [schedule_items], "Tuesday" => [], ...} | |
def current_week_for_mobile | |
start = proxy_association.owner.local_time.beginning_of_week | |
end = proxy_association.owner.local_time.end_of_week | |
(start..end).inject({}) do |memo,day| | |
memo[Date::DAYNAMES[day.wday]] = ScheduleItem.where(date: day.to_date) | |
memo |
NewerOlder