Skip to content

Instantly share code, notes, and snippets.

@robertmarsal
robertmarsal / gist:9feaa9150926efa4175a
Created December 17, 2014 21:09
Install f.lux on Ubuntu 14.10
sudo apt-get install python-glade2 python-appindicator
git clone https://github.com/Kilian/f.lux-indicator-applet.git
cd f.lux-indicator-applet
chmod +x setup.py
sudo ./setup.py install
fluxgui

#Tmux Cheat Sheet

##Windows

Create new

Ctrl-b c

Switch to next

Ctrl-b n
@jarobins
jarobins / gplus_ttopten.py
Last active February 22, 2018 13:11
Access Google+ trends using urllib2. Displays the top ten trends and updates every minute.
import urllib2, re, time
from Tkinter import *
class App:
def __init__(self, master):
self.master = master
frame = Frame(master)
frame.pack()
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@megamattron
megamattron / jquery.jeditable.tinymce.js
Created March 8, 2012 00:08
JEditable TinyMCE custom input plugin
/*
* Wysiwyg input for Jeditable
*
* Copyright (c) 2008 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Depends on jWYSIWYG plugin by Juan M Martinez:
* http://projects.bundleweb.com.ar/jWYSIWYG/
@mitchellh
mitchellh / gist:1277049
Created October 11, 2011 01:30
Configure Vagrant VM to use Host DNS for VPN
Vagrant::Config.run do |config|
# ...
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end