Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
# example of curses: less command | |
import locale | |
import sys | |
import curses | |
def load(): | |
filename = sys.argv[1] | |
with open(filename) as f: | |
return f.readlines(), filename | |
return [], "" |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
key = "" | |
class AuthHandler(SimpleHTTPRequestHandler): | |
''' Main class to present webpages and authentication. ''' | |
def do_HEAD(self): |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#Install necessary things | |
apt-get update | |
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential -y | |
#Get the kernel | |
cd /usr/src | |
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.xz | |
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.sign | |
gpg --verify linux-3.13.tar.sign | |
tar xpvf linux-3.13.tar.xz |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
#!/bin/bash | |
# set -eux | |
# This a simple script that builds static versions of Python and LibPython using musl-libc | |
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/ | |
WORKING_DIR="/code/static-python" | |
MUSL_PREFIX="/code/static-python/musl" | |
PY_PREFIX="/code/static-python/python" |
http://embedded-lab.com/blog/stm32-gpio-ports-insights/
http://hertaville.com/stm32f0-gpio-tutorial-part-1.html
The libmaple libraries, on which STM32duino is based, provides access to registers by the syntax:
GPIOA->regs->REG
#!/bin/bash -e | |
modprobe libcomposite | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir g && cd g | |
echo 0x1d6b > idVendor # Linux Foundation | |
echo 0x0104 > idProduct # Multifunction Composite Gadget | |
echo 0x0100 > bcdDevice # v1.0.0 |
#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.
tested on: orangepi one banana pi M2
dependencies:
apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \
x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
build-essential automake pkg-config libtool ca-certificates git cmake subversion