Skip to content

Instantly share code, notes, and snippets.

View SalemHarrache's full-sized avatar
💭
😴

Salem Harrache SalemHarrache

💭
😴
View GitHub Profile

Since I was one of the alfa-testers, I was able to develop a deployment concept for linux servers which permits to deploy BitTorrent Sync as single or multiple daemons with specific configurations. There are now ready-to-use deb packages available both for Ubuntu or Debian with full debconf-support for automated creation of an optional default configuration. If you are searching for a version more suitable for personal desktop use, please look here.

#INSTALLATION IN UBUNTU

Currently there are packages available for Ubuntu precise, quantal, raring and saucy supporting both i386 and amd64. The packages can be easily installed by adding the PPA and then installing as usual:

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update
sudo apt-get install btsync
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@SalemHarrache
SalemHarrache / .bashrc
Created November 23, 2013 07:41 — forked from cebe/.bashrc
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# simple history browsing
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
@SalemHarrache
SalemHarrache / app.py
Created November 23, 2013 08:44 — forked from DazWorrall/app.py
from flask import Flask, redirect, url_for, request
app = Flask(__name__)
is_maintenance_mode = True
# Always throw a 503 during maintenance: http://is.gd/DksGDm
@app.before_request
def check_for_maintenance():

I'm glad to announce the release of BitTorrent Sync desktop mode packages for all current Debian and Ubuntu versions. If you are searching for a version more suitable for server use, please look here.

These packages are explicitly intended for desktop usage and provide a user experience similar to the Windows and MacOSX versions (except the fact that there is no tray applet). When installed, an instance of BitTorrent Sync will automatically start when the user logs in. The BitTorrent Sync management interface is made available as a normal application icon in the desktop environment:

img

Since this is the first release, please still expect some minor issues. Furthermore the packages still have not been tested with KDE/LXDE and Debian, so any feedback is highly appreciated.

#INSTALLATION IN UBUNTU

@SalemHarrache
SalemHarrache / VBoxManage.sh
Last active August 29, 2015 14:06 — forked from npf/VBoxManage
#!/bin/bash
VBOXMANAGE=/usr/bin/VBoxManage
LOGFILE=/tmp/vagrant/vboxmanage.$(date +%s)
mkdir -p ${LOGFILE%/*}
if [ "$1" == "import" -a "$2" != "-n" ]; then
echo -e "Initial command:\n $ $0 $@" >> $LOGFILE
declare -a opts=("$@") ;
for ((i=0;i<${#opts[@]};i++)); do
case "${opts[$i]}" in
--vmname)
#!/usr/bin/env python
# I was frustrated that no matter what buffer setting I passed to communicate,
# I could not get stdout from my subprocess until the process had completed.
# I googled around and came up with this, which illustrates the problem and a
# solution.
# http://stackoverflow.com/questions/2804543/read-subprocess-stdout-line-by-line
# http://bugs.python.org/issue3907
# http://docs.python.org/library/io.html
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.6 of January 19, 2015
@SalemHarrache
SalemHarrache / Sublime Text 3 Build 3103 License Key - CRACK
Created April 25, 2016 07:12
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@SalemHarrache
SalemHarrache / proxy.py
Created April 2, 2017 10:10 — forked from bxt/proxy.py
A very basic caching python HTTP proxy server.
# Originally from http://sharebear.co.uk/blog/2009/09/17/very-simple-python-caching-proxy/
#
# Usage:
# A call to http://localhost:80000/example.com/foo.html will cache the file
# at http://example.com/foo.html on disc and not redownload it again.
# To clear the cache simply do a `rm *.cached`. To stop the server simply
# send SIGINT (Ctrl-C). It does not handle any headers or post data.
import BaseHTTPServer
import hashlib