Skip to content

Instantly share code, notes, and snippets.

View RobRoy's full-sized avatar

Robert Schmidl RobRoy

View GitHub Profile
@Yonezpt
Yonezpt / YT RMV-AP-UN.user.js
Last active January 30, 2022 04:37
Removes the autoplay up next feature
// ==UserScript==
// @version 1.0.2
// @name Removes the autoplay up next feature
// @match *://www.youtube.com/*
// @run-at document-start
// @grant none
// @noframes
// ==/UserScript==
(function () {
'use strict';
@datenimperator
datenimperator / i18n.rb
Created July 19, 2013 15:16
Did you ever wonder what your Rails i18n is doing? Why your translation isn't found? Add this initializer to log every i18n translation as it happens.
I18n::Backend::Base.class_eval do
def translate_with_logging(locale, key, options = {})
Rails.logger.debug " i18n: #{locale} #{key} #{options.inspect}"
translate_without_logging(locale, key, options)
end
alias_method_chain :translate, :logging
end
@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@wlangstroth
wlangstroth / deploy.rb
Last active September 11, 2021 13:15
Capistrano + Nginx + Unicorn + Sinatra on Ubuntu
require 'bundler/capistrano'
set :application, "net"
set :repository, "git@githost.com:net.git"
set :scm, :git
set :default_environment, {
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
}
@thebigreason
thebigreason / social-sharing-alignment.html
Created October 18, 2011 17:48
Align Facebook Like, Twitter Tweet and Google +1 buttons
<div class="social">
<span class="twitter">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="[your-url-here]">Tweet</a>
</span>
<span class="google">
<g:plusone size="medium" href="[your-url-here]"></g:plusone>
</span>
<span class="Facebook">
<iframe src="https://www.facebook.com/plugins/like.php?href=[your-url-here]&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
</span>
@karmi
karmi / tired.rb
Created May 2, 2011 09:17
Template for generating a no-frills Rails application with support for ElasticSearch full-text search via the Tire gem
# ===================================================================================================================
# Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire
# ===================================================================================================================
#
# This file creates a basic, fully working Rails application with support for ElasticSearch full-text search
# via the Tire gem [http://github.com/karmi/tire].
#
# You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script.
#
# Requirements