$ brew install unbound ldns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide import QtCore, QtGui | |
import sys | |
app = QtGui.QApplication(sys.argv) | |
QtGui.qApp = app | |
folderTree = QtGui.QTreeWidget() | |
header = QtGui.QTreeWidgetItem(["Virtual folder tree","Comment"]) | |
#... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tested on Linux with python 3.7 | |
Must have portaudio installed (e.g. dnf install portaudio-devel) | |
pip install pyqtgraph pyaudio PyQt5 | |
""" | |
import numpy as np | |
import pyqtgraph as pg | |
import pyaudio | |
from PyQt5 import QtCore, QtGui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run on mac in terminal | |
while TRUE; do | |
nc <server_address> 15000 | play -q -t mp3 - || echo Attempting to connect... | |
sleep 1; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Export All Safari Tabs in All Open Windows to a Markdown File | |
July 13, 2015 | |
// SCRIPT PAGE | |
http://hegde.me/urlsafari | |
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT | |
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argpase | |
import fileinput | |
if __name__ == '__main__': | |
parser = ArgumentParser() | |
parser.add_argument('--dummy', help='dummy argument') | |
parser.add_argument('files', metavar='FILE', nargs='*', help='files to read, if empty, stdin is used') | |
args = parser.parse_args() | |
# If you would call fileinput.input() without files it would try to process all arguments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys, requests | |
from lxml import objectify, etree | |
WEBDAV_STATUS_CODE = { # See http://tools.ietf.org/html/rfc4918 | |
'OK' : 200, | |
'CREATED' : 201, | |
'NO_CONTENT' : 204, | |
'MULTI_STATUS' : 207, | |
'NOT_FOUND' : 404, | |
'METHOD_NOT_ALLOWED' : 405, |
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/
- Redo -
C-?
- Change case: 1. Camel Case :
M-c
2. Upper Case :M-u
- Lower Case :
M-l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=DynDNS Updater services | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
EnvironmentFile=/etc/dyndns.conf | |
ExecStart=/usr/bin/wget -qO /tmp/dyndns.out '$DDNSURL' |
- Download the NodeJS version of TiddlyWiki from GitHub or NPM. If you use NPM, do not use the global option (-g).
- Put web.js beside tiddlywiki.js.
- Require web.js from the Express application and call it on every matching request (see below).
- For TiddlyWiki before 5.1.14-Prerelease: In
core/modules/commands/server.js
, seperate out the requestHandler function that is passed to http.createServer so it is on the SimpleServer prototype. Add the self variable to the first line of the requestHandler as shown.
SimpleServer.prototype.listen = function(port,host) {
http.createServer(this.requestHandler.bind(this)).listen(port,host);
};
SimpleServer.prototype.requestHandler = function(request,response) {