Skip to content

Instantly share code, notes, and snippets.

View marckohlbrugge's full-sized avatar
🏠
Working from home

Marc Köhlbrugge marckohlbrugge

🏠
Working from home
View GitHub Profile
#!/usr/bin/env ruby
# Command line util for acquiring a one-off Twitter OAuth access token
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/
require 'rubygems'
require 'oauth'
puts <<EOS
Set up your application at https://twitter.com/apps/ (as a 'Client' app),
@dwabnitz
dwabnitz / customdomain.rb
Created October 22, 2009 19:18 — forked from speedmax/customdomain.rb
rack middleware to resolve a custom domain to an original subdomain in a multi-tenant application
require 'net/dns/resolver'
# Custom Domain
#
# Require net-dns gem
#
# A Rack middleware to to resolve the custom domain to original subdomain
# for your multi telent application.
#
# It's all transperant to your application, it performs cname lookup and
@svallory
svallory / font-awesome-mixins.less
Created August 30, 2012 04:04
FonAwesome Icons using Mixins instead of classes (Please see the first comment)
/* Font Awesome
the iconic font designed for use with Twitter Bootstrap
-------------------------------------------------------
The full suite of pictographic icons, examples, and documentation
can be found at: http://fortawesome.github.com/Font-Awesome/
License
-------------------------------------------------------
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
http://creativecommons.org/licenses/by/3.0/ A mention of
@floscr
floscr / highscoreMoney.js
Last active May 30, 2016 21:53
Calculate the total amount on highscore.money
[].slice.call(document.querySelectorAll('table tr td:nth-child(2)')).reduce((total, num) => {
let numValue = parseInt(num.innerHTML.replace('$', ''));
return total + numValue;
}, 0) + '$';
@dylanjha
dylanjha / history.sh
Last active April 28, 2017 20:48
See what commands you run in your terminal most often. Run this to see which commands you should create new aliases for. Stolen from here: https://superuser.com/questions/250227/how-do-i-see-what-my-most-used-linux-command-are
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
# ENVs
# HEROKU_API_KEY
# HEROKU_APP_NAME
# Gemfile
# gem 'heroku-api'
# config/initializers/heroku.rb
unless (app_name = ENV["HEROKU_APP_NAME"]).nil?
require 'heroku-api'
@gmaclennan
gmaclennan / README.md
Last active June 21, 2019 14:57
Marker Dispersion

Uses d3-force to disperse overlapping markers on a mapbox-gl map.

Markers are tethered to their actual location, but have a collision force based on the radius of the icon. An additional force pulls icons towards their previous location (locations are calculated each time you move the map) to avoid markers jumping around excessively as they settle into different local minima on each re-draw.

@chriseppstein
chriseppstein / readme.md
Created August 31, 2011 21:57 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline

This gist is no longer valid. Please see Compass-Rails for instructions on how to install.

<!-- Do Not Track -->
<script type="text/javascript">
// Global
window.trackingEnabled = function() {
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
return !(dnt === "1" || dnt === "yes");
}();
</script>
<!-- Google Tag Manager, Segment, etc. -->
@mikker
mikker / 00 README.md
Created May 13, 2020 20:59
Open Reading List in Tabs.app

Open Reading List in tabs

  1. Make a new Automator document of type "App"
  2. Add these three steps in order
  3. Remember to replace mikker with your own username in the AppleScript scripts