Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Manouchehri / https.py
Created March 8, 2015 16:23
Run a simple HTTPS server
# http://www.piware.de/2011/01/creating-an-https-server-in-python/
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True)
httpd.serve_forever()
https://www.modern.ie/en-us/virtualization-tools#downloads
IE11 on Win10 -> VirtualBox for Linux
Out of the box, the video device probably isn't the right size.
# vboxmanage setextradata "IE11 - Win10" CustomVideoMode1 1920x1080x32
Install virtio drivers (set network devices to virtio)
https://alt.fedoraproject.org/pub/alt/virtio-win/latest/
@Manouchehri
Manouchehri / i3config
Created March 14, 2015 03:12
~/.i3/config
# Styles
new_window pixel 1
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
floating_modifier Mod1
# Mouse binds
bindsym button2 kill # Doesn't do anything since I have the menus off
@Manouchehri
Manouchehri / commands.sh
Last active August 29, 2015 14:17
Creating portable apps
fakechroot fakeroot debootstrap --foreign --variant=fakechroot --arch i386 lucid ~/ubuntu-lucid-fakeroot/ http://mirror.its.dal.ca/ubuntu/
DEBOOTSTRAP_DIR=~/ubuntu-lucid-fakeroot/debootstrap fakechroot fakeroot debootstrap --second-stage --second-stage-target=~/ubuntu-lucid-fakeroot
sudo debootstrap --arch i386 lucid ~/ubuntu-lucid/ http://mirror.its.dal.ca/ubuntu/
fakechroot fakeroot debootstrap --variant=minbase lucid ~/ubuntu-lucid-fakeroot-x64/ http://mirror.its.dal.ca/ubuntu/
fakechroot fakeroot debootstrap --arch i386 --variant=minbase lucid ~/ubuntu-lucid-fakeroot-x86/ http://mirror.its.dal.ca/ubuntu/
Format:
lpatch patch-file [-dlint-dir] [-bbackup-dir] [-t] [-v]
will apply the patch information provided by the patch-file.
Options:
-dlint-dir (the PC-lint directory) specifies the directory
containing the file(s) to be patched (current directory is
the default). Files in this directory that are patched are
first copied to a back-up directory
@Manouchehri
Manouchehri / .vimrc
Created March 20, 2015 07:00
.vimrc
syntax on
set background=dark
"let g:solarized_termcolors=256
colo solarized
"colo desert
set number
set expandtab
set shiftwidth=2
set softtabstop=2
set bs=2
@Manouchehri
Manouchehri / compton.conf
Created March 27, 2015 02:43
.config/compton.conf
opacity-rule = [
"80:window_type = 'dock' && class_g = 'i3bar'",
"100:class_g *= 'Chromium'",
"100:class_g *= 'Hexchat'"
];
detect-client-opacity = true
fading = true;
fade-delta = 5;
fade-in-step = 0.03;
@Manouchehri
Manouchehri / PKGBUILD
Created March 28, 2015 05:14
hg-fast-export-git
# Maintainer: Techlive Zheng <techlivezheng@gmail.com>
# Contributor: Bhanupong Petchlert <bpetlert@gmail.com>
# Contributor: David Manouchehri <david@davidmanouchehri.com
# Contributor: Michal Rus <m@michalrus.com>
pkgname=hg-fast-export-git
_pkgname='fast-export'
pkgver=r408.d202200
pkgrel=2
pkgdesc="A mercurial to git converter using git-fast-import."
@Manouchehri
Manouchehri / killawatt.md
Last active August 29, 2015 14:21
Power Consumption Measurements
Device Typical (Watts) Peak (Watts)
Nexus 7 (BlackBerry USB adapter) 3 4
Samsung Chromebook 30 32
Chuwi Vi8 (BlackBerry USB adapter) 5
Acer 3830TG (Targus APA30) 19 55
Dell ST2410 24" 24
Desktop (AMD 9950, GTX 460/Idle, RS780) 120 200

http://mighty-hoernsche.de/trunk/

Camera Model Name : Canon PowerShot ELPH 300 HS

Canon Firmware Version : Firmware Version 1.01

Firmware Revision : 1.01 rev 3.00

So use 1.01C.