- UTC is best practice http://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices
- DST changes can causes issues with things like opening hours, publication dates on contracts, etc... UTC helps avoid this
- embrace the pattern: UTC on systems and APIs, TZ display in UI/UX and outputs
- integrations with partners, 3rd-party services (think Amazon, Google Cloud computing, pub/sub services, filepicker... all will use UTC)
- you trade "easier to think about" for "subtle bugs and weird test fails" in the future
- people assuming we're standard UTC like the rest of the world might set up servers/services in CEST and be off by an hour (past example: localina!)
- someday you will work for a company that does things outside of Switzerland. You should learn this :)
rescue_from ActionController::RoutingError do |exception| | |
render :file => Rails.root.join('public', '404.html'), :status => "404", :layout=>false | |
end |
diff --git a/Gemfile b/Gemfile | |
index 34fced8..7edff29 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -16,6 +16,8 @@ group :development do | |
gem "bundler", ">= 1.0.0" | |
gem "jeweler", ">= 1.8.3" | |
gem "simplecov",">= 0.5" | |
+ gem "fastercsv" | |
+ gem "i18n" |
>> h={a:true,b:false,c:1} | |
=> {:a=>true, :b=>false, :c=>1} | |
>> h[:a].present? | |
=> true | |
>> h[:a].presence | |
=> true | |
>> h[:b].present? | |
=> false | |
>> h[:b].presence | |
=> nil |
#!/usr/bin/env ruby | |
require 'socket' | |
# This script runs every minute, captures stats about redis | |
# and forwards them to graphite as counter values. | |
# Graphite/carbon settings | |
GRAPHITE_HOST="graphite.intra.local.ch" | |
GRAPHITE_PORT=8125 |
Jeremy Seitz, Tamedia Core Engineering, Oct 2016
Tamedia is the company behind many well-known online Swiss brands, such as 20min, Starticket, Ricardo, Doodle, Homegate, and many others. Core Engineering is a small expert tech consulting group that serves these companies, working closely with engineering teams across the company. Through project work, architecture, training, events, and providing resources, we help the companies of Tamedia bring speed and agility to their engineering efforts.
One of the functions of Core Engineering is to build relationships with freelancers and tech agencies in Switzerland. We make it easier for freelancers to work with the different companies in Tamedia, through close collaboration, simplifying contract and billing processes, more flexible placement, access to services and resources, and communication with key contacts across the organizatio
To use this: | |
1. check out the gist somewhere | |
2. edit the plist to contain the path to the .rb file | |
3. run this: | |
chmod +x update-webkit.rb | |
launchctl load com.indirect.update-webkit.plist |
/* disable user selections */ | |
jQuery.fn.disableSelection = function(){ | |
$(this).each(function(){ | |
$(this).attr('unselectable', 'on') | |
.css('-moz-user-select', 'none') | |
.each(function() { | |
this.onselectstart = function() { return false; }; | |
}); | |
}); |
function debug(){ | |
if (typeof console != "undefined"){ | |
if (console.log){ | |
if (arguments.length == 1){ | |
console.log(arguments[0]); | |
} else { | |
console.log(arguments); | |
} | |
} | |
} |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'raindrops' | |
require 'statsd' | |
# | |
# This script monitors the active and queued unicorn processes. | |
# It uses the raindrops gem to look at the unix domain socket. | |
# Stats are polled every second (for one minute) and pushed to | |
# statsd as a counter. This script runs once a minute. |