Skip to content

Instantly share code, notes, and snippets.

View ndege's full-sized avatar

Frank Morgner ndege

View GitHub Profile
@dysinger
dysinger / simple-nginx-webdav.sh
Created January 5, 2010 20:32
A simple nginx/webdav setup for use with things like mobile-org
#!/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 \
@pbnjay
pbnjay / pbnjay_bibtex.js
Created February 15, 2012 15:13
Zotero BibTeX translator with tags as citekeys (updated 23rd Apr 2012)
{
"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,
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 19, 2025 04:39
Useful PostgreSQL Queries and Commands
-- 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%'
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@miku
miku / pre-push.sh
Last active August 29, 2015 14:05
Suppress push of certain branch to a certain remote.
#!/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 ...

Happy Time Go Libraries.

Another curated list like awesome-go.
Not complete. Not authoritative. Not cupcake.
Send suggestions: @squarism :)
☆ = Github stars (in September 2014)


Adapters and Drivers

@JPvRiel
JPvRiel / ubunut_network_manager_docker_dns_workaround.md
Last active March 14, 2025 14:17
Ubuntu, NetworkManager and Docker DNS workaround

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.

Perminant workarround

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
@thomascube
thomascube / image2grf.php
Created July 11, 2018 08:02
PHP function to convert a PNG image to a .GRF file for use with Zebra printers
<?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.
*
@metafloor
metafloor / zpl-quick-reference.md
Last active April 15, 2025 11:27
ZPL Quick Reference

ZPL Commands

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