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
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
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
from datetime import datetime | |
from flask import Flask, session, redirect | |
from flask_sso import SSO | |
def get_user_session_info(key): | |
return session['user'].get( | |
key, | |
'Key `{0}` not found in user session info'.format(key) |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git
const purpose = "Purpose: deobfuscate odttf file (extracted from M$ XPS file)" | |
const usage = "Usage: node deobfuscate-odttf-in-xps.js <guid-obfuscated-font-file.odttf> [<output-file.ttf>]" | |
const obfuscatedStartOffset = 0 //start of obfuscated bytes in font file | |
const obfuscatedEndOffset = 32 //start of obfuscated bytes in font file | |
const guidSize = 32 // length of GUID string (only hex characters included) | |
const fs = require('fs') | |
const path = require('path') |
#! /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 |
Adapted from caddy systemd Service Unit
The provided file should work with systemd version 219 or later. It might work with earlier versions.
The easiest way to check your systemd version is to run systemctl --version
.
We will assume the following:
SHELL=/bin/bash | |
# to see all colors, run | |
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done' | |
# the first 15 entries are the 8-bit colors | |
# define standard colors | |
ifneq (,$(findstring xterm,${TERM})) | |
BLACK := $(shell tput -Txterm setaf 0) | |
RED := $(shell tput -Txterm setaf 1) |
Reverse Engineering the Apple Airscan / eSCL Protocol | |
I am not certain of the origins, one person involved in IPP printing claimed it was proprietary of HP , but then again they have their own protocol. AirScan/eSCL is used by other manufacturers too like Xerox, Kyocera, Canon and more. Mopria also seems to claim some responsibility for it but then again it seems not completely. In any case it seems shrouded in such secrecy that to date several years after its implementation, unless someone wants to take it all apart. | |
I offer this as my contribution. It is not perfect but almost there. | |
As I began looking for information to make a scanner more compatible, I could only find fragments of information. Even Apple Developer Forums offered zero help. | |
Server/Client in eSCL / AirScan: | |
There is a “server”and a “client” the client can be a desktop computer or mobile device. The server is a scanner or another device configured to emulate a hardware scanner, even a desktop computer. In my case I did this on Linux, so |
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps
This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.
Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.
Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).
To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem