sudo apt-get install socat
host github.com
proxycommand socat - PROXY:localhost:%h:%p,proxyport=8080
###If you want to use SOCKS proxy, edit it like this. host bitbucket.org ProxyCommand socat - SOCKS:localhost:%h:%p,socksport=7070
| [user] | |
| name = First Last | |
| email = foo@example.com | |
| [core] | |
| excludesfile = ~/.gitignore | |
| autocrlf = true | |
| [alias] | |
| ci = commit |
| package com.foo; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import com.google.gson.Gson; | |
| public class Foo { | |
| private static List<Integer> toList(String json, Gson parser) { |
| #!/usr/bin/env python | |
| import getopt | |
| import sys | |
| import random | |
| import string | |
| DEFAULT_LENGTH = 16 | |
| def main(): |
| #! /bin/bash | |
| # Set the default policies to allow everything while we set up new rules. | |
| # Prevents cutting yourself off when running from remote SSH. | |
| iptables -P INPUT ACCEPT | |
| iptables -P FORWARD ACCEPT | |
| iptables -P OUTPUT ACCEPT | |
| # Flush any existing rules, leaving just the defaults | |
| iptables -F |
| #!/usr/bin/env python | |
| import SimpleHTTPServer | |
| import SocketServer | |
| # minimal web server. serves files relative to the | |
| # current directory. | |
| PORT = 8080 | |
| Handler = SimpleHTTPServer.SimpleHTTPRequestHandler |
| import os | |
| import posixpath | |
| import urllib | |
| import BaseHTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| # modify this to add additional routes | |
| ROUTES = ( | |
| # [url_prefix , directory_path], | |
| ['', 'E:\Dropbox\Other\python-server'], # empty string for the 'default' match |
| VM=`docker-machine ls 2>/dev/null | sed -n 2p | awk '{print $1}'` | |
| [ -z "$VM" ] && VM=default |
| package document.transform; | |
| import com.itextpdf.kernel.geom.AffineTransform; | |
| import com.itextpdf.kernel.geom.Point; | |
| import junit.framework.TestCase; | |
| import org.junit.Test; | |
| public class AffineTransformTests extends TestCase { |
| class TTFontInfo(object): | |
| bold_names = ("bold", "demibold", "demi-bold", "demi bold", "negreta", "demi",) | |
| italic_names = ("italic", "cursiva", "oblique", "inclined",) | |
| bold_italic_names = ("bolditalic", "bold-italic", "bold italic", "boldoblique", "bold-oblique", | |
| "bold oblique", "demibold italic", "negreta cursiva", "demi oblique",) |