start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
#!/usr/bin/env python | |
import socket | |
import threading | |
import select | |
import sys | |
terminateAll = False | |
class ClientThread(threading.Thread): |
#!/usr/bin/env python2 | |
#-*- coding=utf-8 -*- | |
# © 2013 Mark Harviston, BSD License | |
from __future__ import absolute_import, unicode_literals, print_function | |
""" | |
Qt data models that bind to SQLAlchemy queries | |
""" | |
from PyQt4 import QtGui | |
from PyQt4.QtCore import QAbstractTableModel, QVariant, Qt | |
import logging # noqa |
/* | |
leo_usb2serial | |
Allows to use an Arduino Leonardo as an usb to serial converter. | |
*/ | |
void setup() { | |
Serial.begin(115200); | |
Serial1.begin(115200); | |
} |
Note for newcomers: | |
In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention | |
used in the Midnight Commander documentation and was kept here. | |
You can also use "ESC" instead of "ALT", which is useful on Macbooks. | |
Main View | |
--------------------------------------------------------------- | |
- File/directory operations |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
#!/usr/bin/env python | |
# Copyright (c) 2009, David Buxton <david@gasmark6.com> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
from __future__ import print_function | |
import requests | |
import json | |
import cv2 | |
addr = 'http://localhost:5000' | |
test_url = addr + '/api/test' | |
# prepare headers for http request | |
content_type = 'image/jpeg' |
# Set aliases | |
aliases['l'] = ['dir'] | |
aliases['ls'] = ['dir'] | |
aliases['g'] = ['git'] | |
aliases['glog'] = ['git', 'log', '--decorate', '--oneline', '--graph'] | |
aliases['gst'] = ['git', 'status'] | |
aliases['gc'] = ['git', 'commit'] | |
aliases['ga'] = ['git', 'add'] | |
aliases['gau'] = ['git', 'add', '-u'] | |
aliases['gaa'] = ['git', 'add', '-A'] |