Command | Format | Description |
---|---|---|
^A | ^Afo,h,w,d:f.x | Use Scalable/Bitmapped Font |
^A@ | ^A@o,h,w,d:f.x | Use Font Name to Call Font |
^B0 | ^B0a,b,c,d,e,f,g | Aztec Bar Code Parameters |
^B1 | ^B1o,e,h,f,g | Code 11 Bar Code |
^B2 | ^B2o,h,f,g,e,j | Interleaved 2 of 5 Bar Code |
^B3 | ^B3o,e,h,f,g | Code 39 Bar Code |
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
<?php | |
/** | |
* Converts a PNG image to a .GRF file for use with Zebra printers | |
* | |
* The input is preferably a 1-bit black/white image but RGB images | |
* are accepted as well. | |
* | |
* This function uses PHP's GD library image functions. | |
* |
Docker issues are frequently logged for DNS resolution in containers because it doens't inhert or get values for DNS from NetworkManager which leverages a built in dnsmasq to inteligently manage DNS.
sudo bash -c "echo listen-address=$(ip -4 addr show dev docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') > /etc/NetworkManager/dnsmasq.d/docker-bridge"
sudo systemctl reload NetworkManager
sudo bash -c 'echo -e "{\n\t\"dns\": [\"$(ip -4 addr show dev docker0 | grep -oP "(?<=inet\s)\d+(\.\d+){3}")\"]\n}" > /etc/docker/daemon.json'
sudo systemctl restart docker
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
#!/usr/bin/env bash | |
# pre-push hook to prevent push of certain branches to github.com | |
# copy this file to .git/hooks/pre-push | |
# and make it +x | |
REMOTE="$1" | |
URL="$2" | |
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
FORBIDDEN_BRANCH="private" # change this to your private branch ... |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
{ | |
"translatorID": "7b4cd20f-4c4e-4d1c-b622-cfb6e2269a1c", | |
"translatorType": 3, | |
"label": "BibTeX-citekey", | |
"creator": "Simon Kornblith and Richard Karnesky", | |
"target": "bib", | |
"minVersion": "2.1.9", | |
"maxVersion": null, | |
"priority": 2, | |
"inRepository": false, |
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/sh | |
# on ubuntu: need some utils & dev libs | |
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev | |
# compile nginx | |
cd /tmp | |
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz | |
cd nginx* | |
./configure --with-http_ssl_module --with-http_dav_module \ |