Skip to content

Instantly share code, notes, and snippets.

View SalemHarrache's full-sized avatar
💭
🤤

Salem Harrache SalemHarrache

💭
🤤
View GitHub Profile
@SalemHarrache
SalemHarrache / renew-gpgkey.md
Created June 15, 2024 07:12 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@SalemHarrache
SalemHarrache / arch-linux-install
Created June 14, 2020 15:39 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@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
@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
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.6 of January 19, 2015
#!/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
@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)

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 / 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():
@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