Description | Command |
---|---|
Start a new session with session name | screen -S <session_name> |
List running sessions / screens | screen -ls |
Attach to a running session | screen -x |
Attach to a running session with name | screen -r |
#!/bin/bash | |
# As the "bufferbloat" folks have recently re-discovered and/or more widely | |
# publicized, congestion avoidance algorithms (such as those found in TCP) do | |
# a great job of allowing network endpoints to negotiate transfer rates that | |
# maximize a link's bandwidth usage without unduly penalizing any particular | |
# stream. This allows bulk transfer streams to use the maximum available | |
# bandwidth without affecting the latency of non-bulk (e.g. interactive) | |
# streams. |
import sys | |
import prlsdkapi | |
if len(sys.argv) != 4: | |
print "Usage: parallels_send_keycode '<VM_NAME>' '<keyname>' '<press|release>'" | |
exit() | |
# Parse arguments | |
vm_name=sys.argv[1] | |
# Keycode to use |
# taken from user Albert's answer on StackOverflow | |
# http://stackoverflow.com/questions/5292204/macosx-get-foremost-window-title | |
# tested on Mac OS X 10.7.5 | |
global frontApp, frontAppName, windowTitle | |
set windowTitle to "" | |
tell application "System Events" | |
set frontApp to first application process whose frontmost is true | |
set frontAppName to name of frontApp |
So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).
Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.
In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat
var gulp = require('gulp'), | |
path = require("path"), | |
gutil = require('gulp-util'), | |
uglify = require("gulp-uglify"), | |
ts = require("gulp-typescript"), | |
tsClientProject = ts.createProject("source/javascript/tsconfig.json"), | |
tsElectronProject = ts.createProject("source/app/tsconfig.json"), | |
bowersource = "bower_components/", | |
jshint = require('gulp-jshint'), |
#! /usr/bin/env python3 | |
# ~*~ utf-8 ~*~ | |
import mailbox | |
import bs4 | |
def get_html_text(html): | |
try: | |
return bs4.BeautifulSoup(html, 'lxml').body.get_text(' ', strip=True) | |
except AttributeError: # message contents empty |
#!/usr/bin/env bash | |
################################################################ | |
# Auto-Copy Script for unRAID Unassigned Devices Plugin | |
# Original script: https://gitlab.com/snippets/1737763 | |
################################################################ | |
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin | |
# Available variables: | |
# |
Ever since I started working on my honours thesis in 2013, I had been tinkering with various workflows to manage references, PDFs, PDF annotations and notes all in some coherent way. The workflow I describe here is the latest one (February 2021 as of writing), and I think I've finally found something that satisfies a lot of the [admittedly very subjective] desiderata.
Being [perhaps overly] wary of mis-citing something, I'd like to be able to quickly go back to the original source, and the exact page and PDF highlight that I'm referring to. For the last couple of years, I have been using the Highlights App (MacOS only, unfortunately; though there may be Windows/Linux equivalents). The two main features of Highlights are that:
- It automatically extracts PDF highlights and is able to keep them updated in a 'sidecar' file, so for a file like
Ram_et_al_2020_Neural_Network.pdf
, there'll be
This is a script that helps keep git repositories named and stored in a consistent way. When this script is run, it will clone the specified git repository to a standardized location with a standardized directory structure.
Running either of these commands will result in the same output:
git-clone-path git@github.com:cli/cli.git
git-clone-path https://github.com/cli/cli.git