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
$ sudo vim /etc/systemd/system/docker-compose.service | |
[Unit] | |
Description=DockerCompose | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
ExecStart=/opt/bin/docker-compose -f /home/core/docker-compose.yml up -d |
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 | |
require "ipaddr" | |
module IPCat | |
class Datacenter | |
attr_reader :range, :name, :url | |
def initialize(start_addr, end_addr, name, url = nil) |
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
$ bundle exec rails console | |
2.1.2 (main):0 > now = Time.now; now - 1.minute == now - Integer(1.minute) | |
=> true | |
2.1.2 (main):0 > now = Time.now; now - 1.month == now - Integer(1.month) | |
=> false # WTF! | |
2.1.2 (main):0 > 1.month == Integer(1.month) | |
=> true |
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
#!/bin/sh | |
# vim: set ft=sh : | |
if [ $# -ne 1 ]; then | |
echo "List of WIP branches:" | |
git branch|grep -e '^wip_' | |
else | |
if [ -z "$(git ls-files)" ]; then | |
echo "No files to stash in the staging area" >&2 | |
exit 1 |
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
-- Taken from http://wiki.postgresql.org/wiki/Lock_Monitoring | |
-- (PostgreSQL < 9.2 version) | |
SELECT bl.pid AS blocked_pid, | |
a.usename AS blocked_user, | |
ka.current_query AS blocking_statement, | |
now() - ka.query_start AS blocking_duration, | |
kl.pid AS blocking_pid, | |
ka.usename AS blocking_user, | |
a.current_query AS blocked_statement, | |
now() - a.query_start AS blocked_duration |
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
# vim: se ft=ruby : | |
# ${HOME}/.pryrc | |
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953 | |
if defined?(::Bundler) || File.exists?('Gemfile') | |
global_gemset = ENV['GEM_PATH'].split(':').grep(%r{ruby.*@global|gemsets/global}).first | |
if global_gemset | |
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*") | |
all_global_gem_paths.each do |p| |
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
# vim: se ft=gitconfig : | |
[diff] | |
color = true | |
[alias] | |
; shortcuts | |
st = status | |
a = add | |
ap = add -p |
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
# vim: se ft=ruby : | |
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953 | |
if defined?(::Bundler) || File.exists?('Gemfile') | |
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first | |
if global_gemset | |
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*") | |
all_global_gem_paths.each do |p| | |
gem_path = "#{p}/lib" | |
$LOAD_PATH << gem_path |
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
1.9.2@global|drr@drr-x201:~/.rvm/gems/ruby-1.9.2-p180-patched@ftv/gems/jasmine-headless-webkit-0.7.1 $ ldd ext/jasmine-webkit-specrunner/jasmine-webkit-specrunner | |
linux-vdso.so.1 => (0x00007ffff97ff000) | |
libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0x00007fcf562f5000) | |
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x00007fcf55615000) | |
libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0x00007fcf552d4000) | |
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007fcf54e2f000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcf54c13000) | |
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcf54908000) | |
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcf54686000) | |
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcf54470000) |
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
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:553:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension ext/jasmine-webkit-specrunner/extconf.rb. (#<ArgumentError: invalid byte sequence in UTF-8>) (Gem::Installer::ExtensionBuildError) | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:20:in `gsub' | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:20:in `make' | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/ext/ext_conf_builder.rb:18:in `build' | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:532:in `block (2 levels) in build_extensions' | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:531:in `chdir' | |
/home/drr/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:531:in `block in build_extensions' | |
/ |
NewerOlder