shadowsocks + privoxy/tsocks
shadowsocks
: service, socks proxyprivoxy
: service, convert socks proxy to http proxytsocks
: tool, use socks proxy for any command line
tested under ubuntu14.04
#!/bin/bash | |
# Clones as usual but creates local tracking branches for all remote branches. | |
# To use, copy this file into the same directory your git binaries are (git, git-flow, git-subtree, etc) | |
clone_output=$((git clone "$@" ) 2>&1) | |
retval=$? | |
echo $clone_output | |
if [[ $retval != 0 ]] ; then | |
exit 1 |
public class CountingFileRequestBody extends RequestBody { | |
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE | |
private final File file; | |
private final ProgressListener listener; | |
private final String contentType; | |
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) { | |
this.file = file; |
/* Use libcurl to POST JSON data. | |
Usage: PostJSON <name> <value> | |
curl-library mailing list thread: | |
'how do i post json to a https ?' | |
http://curl.haxx.se/mail/lib-2015-01/0049.html | |
Copyright (C) 2015 Jay Satiro <raysatiro@yahoo.com> | |
http://curl.haxx.se/docs/copyright.html |
/* Use libcurl to upload POST data. | |
Usage: PostUpload <post_data_filename> <url> | |
Used this as a speed test in Win7 x64, see | |
https://github.com/curl/curl/issues/708 | |
First test the speed in a web browser: | |
Go to https://testmy.net/mirror and choose the geographically closest mirror. | |
After the mirror is set click on 'Upload Test'. |
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
typedef unsigned char uint8_t; | |
/** | |
* @param src input nv12 raw data array |
git clone https://github.com/owner/git.git
git clone git@github.com:owner/git.git
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
r"""Command-line tool to validate and pretty-print JSON | |
Usage:: | |
$ echo '{"json":"obj"}' | python -m json.tool | |
{ | |
"json": "obj" | |
} | |
$ echo '{ 1.2:3.4}' | python -m json.tool | |
Expecting property name: line 1 column 2 (char 2) |
Desktop linux has been late to the show with high dpi support, but gnome seems to be leading the pack. I decided to try again. It's worked fairly well out of the box. Here are my steps if anyone wishes to repeat.
Download the iso from http://ubuntugnome.org/ubuntu-gnome-14-10-is-released/
Insert usb stick, umount using diskutil and dd the image. (make sure to use the right devices when using dd, your setup may vary)