This file contains 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
<html> | |
<head> | |
</head> | |
<body> | |
<script type="text/javascript" charset="utf-8"> | |
function getInternetExplorerVersion() | |
// Returns the version of Internet Explorer or a -1 | |
// (indicating the use of another browser). | |
{ | |
var rv = -1; // Return value assumes failure. |
This file contains 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
cd photos/favorites | |
wget `curl "http://flickmator.heroku.com/<unique_key>/text"` -nc |
This file contains 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
# | |
# Wo | |
# | |
# Projects workflow toolkit for bash-like shells (tested with zsh). | |
# (c) 2011 Thomas Pelletier <http://thomas.pelletier.im/> under MIT License | |
# (see http://www.opensource.org/licenses/mit-license.php) | |
# | |
# Works with virtualenvwrapper and rvm. | |
# |
This file contains 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
for dir in `ls .` | |
do | |
if [ -d $dir ]; then | |
if [ $dir != "." ]; then | |
if [ $dir != ".." ]; then | |
echo $dir | |
cd $dir && python setup.py install && cd .. | |
fi | |
fi | |
fi |
This file contains 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
# -*- coding: UTF-8 -*- | |
import sys | |
import datetime | |
import subprocess | |
from xml.dom.minidom import parse, parseString | |
def html2rst(html): |
This file contains 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
""" | |
Thomas Pelletier's Python deployment script. | |
MIT Licensed. | |
We assume that: | |
* deploy.py lives in the root of your project. | |
* In the same directory, there is a dependencies.txt file, in PIP format. | |
* Remote host has a working Python+VENV+PIP environment. | |
* You have enough privileges. |
This file contains 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 'rubygems' | |
require 'rexml/Document' | |
def parse_opml(content) | |
opml = REXML::Document.new(content) | |
body = opml.elements['opml/body'] | |
feeds = [] | |
body.elements.each('outline') do |el| |
This file contains 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
class SourcesController < ApplicationController | |
before_filter :authenticate_user! | |
protected | |
def load_sources | |
@sources = current_user.sources | |
end |
This file contains 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
;; Coloration syntaxique (global-font-lock-mode t) | |
;; Afficher numéro de ligne et de colone | |
(column-number-mode t) (line-number-mode t) | |
;; Selection PC (avec Shift) | |
(custom-set-variables '(pc-selection-mode t nil (pc-select))) | |
;; Mollette pour le defilement | |
(custom-set-variables '(mouse-wheel-mode t nil (mwheel))) | |
;; Afficher l'heure et la date | |
(setq display-time-24hr-format t) | |
(setq display-time-day-and-date t) |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
""" | |
This is a simple Twitter to email script. | |
You need: | |
- An SMTP server (such as Sendgrid.net). | |
- A Redis server. | |
- Python. | |
Don't forget: |