This file contains hidden or 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 'time' | |
# Files with a name like "2010-12-08 12.34.20.png" gets their | |
# exif dates set to that time. | |
files = Dir.glob('*.*g') | |
files.each do |file| | |
date = file.to_s[0...file.to_s.length-4] | |
time = Time.parse(date.gsub('.', ':')) |
This file contains hidden or 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 'net/http' | |
require 'json' | |
token = ENV['GITHUB_TOKEN'] | |
issue_id = ARGV.first | |
# get org and repo | |
repo_url = `git config --get remote.origin.url`.strip |
This file contains hidden or 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
diff --git i/config/environment.rb w/config/environment.rb | |
index 7549e10..b1636d4 100644 | |
--- i/config/environment.rb | |
+++ w/config/environment.rb | |
@@ -124,6 +124,7 @@ Rails::Initializer.run do |config| | |
config.autoload_paths << RAILS_ROOT + '/app/services' | |
config.plugin_paths << 'services' | |
+ config.reload_plugins = true if ENV["RAILS_ENV"] == 'development' | |
This file contains hidden or 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
// ==UserScript== | |
// @name Travis-- | |
// @namespace thejspr.com | |
// @version 0.1 | |
// @description Removes some fuzz from the travis UI and improves it for large builds | |
// @match https://magnum.travis-ci.com/* | |
// @copyright 2014+, Jesper Kjeldgaard | |
// ==/UserScript== | |
$(document).ready(function(){ |
This file contains hidden or 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
diff --git c/app/models/photo.rb w/app/models/photo.rb | |
index 60b3ab3..c6a99fb 100644 | |
--- c/app/models/photo.rb | |
+++ w/app/models/photo.rb | |
@@ -51,6 +51,7 @@ class Photo < ActiveRecord::Base | |
:processors => [:thumbnail, :optimize], | |
:convert_options => { | |
:search_v4 => '-quality 70', | |
+ :banner => '-quality 80 -interlace Plane -strip' | |
} |
This file contains hidden or 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 mute_observer(excluded_observer) | |
observers = ActiveRecord::Base.observers | |
ActiveRecord::Base.observers = observers - [excluded_observer] | |
yield | |
ensure | |
ActiveRecord::Base.observers = orig_observers | |
end |
This file contains hidden or 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 | |
# put this in .git/hooks/prepare-commit-msg | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
pivotal_story_number = `git rev-parse --abbrev-ref HEAD | grep --only-matching '[0-9]*$'`.strip | |
# do not add anything if the branch doesn't have a story number or the message already contains one. |
This file contains hidden or 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 | |
# JRuby | |
# gem install msgpack-jruby | |
# MRI | |
# gem install msgpack | |
require 'benchmark' |
This file contains hidden or 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 | |
# encoding: utf-8 | |
require 'open-uri' | |
VALID_FORMATS = ['pdf', 'html', 'mobi', 'epub'] | |
format = ARGV[0] || 'pdf' | |
unless VALID_FORMATS.include?(format) |
This file contains hidden or 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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="http://evently-lister.herokuapp.com/evently-lister.js"></script> | |
<script> | |
$('#my-events').eventlyLister({ | |
venue: '1' // for a venues events | |
promoter: '2' // for a promoters events | |
width: 3 // width of the widget (defaults to the containing elements' width) | |
theme: 'light' // select a theme (optional) | |
}) | |
</script> |
NewerOlder