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 python3 | |
import sys | |
import quopri | |
import subprocess as sp | |
def main(): | |
#: Retrieve mail from the clipboard. | |
#: Depends on your system configuration. | |
encrypted = sp.Popen(['xclip', '-o'], stdout=sp.PIPE) |
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
!function() { | |
/* | |
RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. | |
Available via the MIT or new BSD license. | |
see: http://github.com/jrburke/requirejs for details | |
*/ | |
/** | |
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. |
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
""" | |
Thanks to Kyle Miller for his article "Tail call recursion in Python" [1]. | |
Despite how good is to remove this limitation, probably, you have to be | |
aware of why this feature is not officially supported. [2] | |
[1]: http://www.kylem.net/programming/tailcall.html | |
[2]: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.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
#!/usr/bin/env bash | |
# -*- encoding: utf-8 -*- | |
# Script makes a backup of mysql database by retieving settings from .env file. | |
# | |
# 'stdout' stream can be logged but script itself has no logging logic. | |
# | |
# If everything goes right, exit code will be equal to zero so you can use this | |
# for builing wrappers around it to infrom that backup failed execution. |
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
# ~*~ encoding: utf-8 ~*~ | |
import argparse | |
import re | |
import requests | |
from urllib import urlencode | |
from urlparse import urljoin, urlparse | |
from bs4 import BeautifulSoup | |
from flask import Flask, Response, stream_with_context, request |
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
/** | |
* Create a new socket instance between client and server, | |
* and start use it | |
* | |
* @method mySocketChatRoom | |
* | |
* @param roomId {String} A unique string to represent a single room | |
* @param username {String} The username to use on this room | |
*/ | |
function mySocketChatRoom(roomId, username) { |
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 bash | |
# ~*~ coding: utf-8 ~*~ | |
########################################## | |
# Installing commons | |
########################################## | |
command_exist () { which $1 > /dev/null; } | |
# Install vim |
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
"""""""""""""""""""""""""""" | |
" Vandle | |
"""""""""""""""""""""""""""" | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
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
# replace C-B (command) with symbol ` | |
set -g prefix ` | |
bind ` send-prefix | |
# command+a paste symbol ` | |
bind-key a send-keys ` | |
# command+r reread conf file | |
bind-key r source-file ~/.tmux.conf |
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 bash | |
echo Now run firefox -> preferences -> advanced -> network -> settings -> Manual proxy configuration \ | |
SOCKS Host: 127.0.0.1 Port:8080 | |
# Change user@superhost.com with any ssh alias or so | |
ssh -D 8080 -C -N user@superhost.com |