Skip to content

Instantly share code, notes, and snippets.

View erickreutz's full-sized avatar

Eric Kreutzer erickreutz

View GitHub Profile
"pool_list" :
[
{"pool_address" : "pool.minexmr.com:7777", "wallet_address" : "44AwzQTh3KEdMwhPVb4EkJYR7m5HwbX3eTRkcKNCrXZvJwAFbeVkCPyHdEimGsrTZiWEXhbh5CrMUezT1tXbnfvj4E95vyZ", "pool_password" : "x", "use_nicehash" : false, "use_tls" : false, "tls_fingerprint" : "", "pool_weight" : 1 },
],
@erickreutz
erickreutz / tumblr-multilike.js
Last active January 1, 2016 10:28
Tumblr multi-like
(function() {
// This handles having multiple like buttons of the same post on the page
// at once. When you like/unlike one the others will update accordingly
// I.E. One in a grid of posts and one in an overlay loaded via ajax on top of the grid.
// See thingslog-theme.tumblr.com as an example.
if (Tumblr && Tumblr.LikeButton) {
Tumblr.LikeButton.update_like_state = function(data) {
if (data.post_id) {
require 'formula'
class Libav < Formula
homepage 'http://libav.org/'
url 'http://libav.org/releases/libav-9_beta2.tar.xz'
sha1 'acb7ffbcded06e5f04e8fd0f7dbcc923fd95df3f'
head 'git://git.libav.org/libav.git'
option "without-x264", "Disable H264 encoder"
@erickreutz
erickreutz / retina-sprite-recipe.scss
Last active December 18, 2015 19:48
This is a the best method I have found for getting css image sprites working with both retina and non-retina images.
$sprites: sprite-map("icons/*.png", $spacing: 2px);
$sprites2x: sprite-map("icons-2x/*.png", $spacing: 2px);
@mixin icon-with-retina($name) {
@include sprite-dimensions($sprites, $name);
background-position: sprite-position($sprites, $name);
@include hidpi(2.0) {
$pos: sprite-position($sprites2x, $name);
background-position: nth($pos, 1) / 2 nth($pos, 2) / 2;
$i: 2;
@while $i <= 6 {
#container[data-cols="#{$i}"] {
$width: $baseWidth / $i;
.item {
width: $width;
&.featured {
width: $width * 2;
require 'formula'
class TmuxIterm2 < Formula
homepage 'https://code.google.com/p/iterm2/wiki/TmuxIntegration'
url 'https://iterm2.googlecode.com/files/tmux-for-iTerm2-20130319.tar.gz'
sha1 'f14a0bad6991b9e3380d5c3a6057e09f62597d1f'
depends_on 'pkg-config' => :build
depends_on 'libevent'
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130122.zip'
sha1 'a5f55b545500ebcb97e842f65ea9c90dd457f228'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
@keyframes animationName {
0% {
#someElement {
margin-left: 100px;
width: 300%;
}
.someOtherElement {
opacity: 0.0;
}
@erickreutz
erickreutz / elastic_search.rb
Created April 10, 2012 21:47
Heroku and Elasticsearch with Tire
require 'uri'
if ENV['BONSAI_INDEX_URL'].present?
uri = URI( ENV['BONSAI_INDEX_URL'] )
Tire.configure {
url "#{uri.scheme}://#{uri.host}"
global_index_name uri.path[/[^\/]+$/]
}
end