Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
# A DNS change to Rubygems.org is causing lingering issues. Namely, | |
# rubygems.org and production.s3.rubygems.org are still pointing to | |
# the old address. See: | |
# http://twitter.com/#!/gemcutter/status/30666857698557952 | |
# The symptoms: | |
# $ gem install benelux --version 0.5.17 | |
# ERROR: Could not find a valid gem 'benelux' (= 0.5.17) in any repository | |
# ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
##Incomplete Reminders Search:
The script is pretty basic and goes like the following:
-reminderDoneTime:00011231 reminderOrder:00011231
###How it works
To start with, reminderDoneTime:[datetime]
returns true if it finds a date that is on or after what is listed. We can invert this by prepending the query with a -
. As a result, -reminderDoneTime:[datetime]
returns true if the note either has no timestamp or if it has a date before [datetime]
.
#!/bin/bash | |
# Build latest version of Emacs, version management with stow | |
# OS: Ubuntu 14.04 LTS | |
# version: 24.5 | |
# Toolkit: lucid | |
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs | |
set -e |
################################ | |
# GitLab email server settings # | |
################################ | |
# see https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/doc/settings/smtp.md#smtp-settings | |
# Use smtp instead of sendmail/postfix. | |
gitlab_rails['smtp_enable'] = true | |
gitlab_rails['smtp_address'] = "smtp.mailgun.org" | |
gitlab_rails['smtp_port'] = 587 | |
gitlab_rails['smtp_authentication'] = "plain" | |
gitlab_rails['smtp_enable_starttls_auto'] = true |