Skip to content

Instantly share code, notes, and snippets.

View wwerner's full-sized avatar

Wolfgang Werner wwerner

View GitHub Profile
@olih
olih / jq-cheetsheet.md
Last active March 31, 2025 22:13
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@bmhatfield
bmhatfield / .profile
Last active January 29, 2025 11:11
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@parmentf
parmentf / GitCommitEmoji.md
Last active March 30, 2025 17:30
Git Commit message Emoji
@fitnr
fitnr / git-ics
Created December 28, 2015 23:23
git tool for converting log to ICS file
# git-ics
# Place in your $PATH (e.g. ~/bin)
# Accepts any options that can be passed to git log
# usage: git ics [opts] > cal.ics
echo BEGIN:VCALENDAR
echo METHOD:PUBLISH
echo VERSION:2.0
echo PRODID:-//git-ics//git-ics//EN
echo CALSCALE:GREGORIAN
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 1, 2025 03:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active March 14, 2025 01:20
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@cluppi
cluppi / after.sh
Created March 19, 2015 19:01
Turning SSL on for Homestead
#!/bin/sh
# Config for SSL.
echo "--- Making SSL Directory ---"
mkdir /etc/nginx/ssl
echo "--- Copying $i SSL crt and key ---"
openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com"
echo "--- Turning SSL on in nginx.conf. ---"
@patik
patik / .bashrc
Last active December 24, 2024 14:57
Bash configure proxy for corporate network
# configure proxy for git while on corporate network
# From https://gist.github.com/garystafford/8196920
function proxy_on(){
# assumes $USERDOMAIN, $USERNAME, $USERDNSDOMAIN
# are existing Windows system-level environment variables
# assumes $PASSWORD, $PROXY_SERVER, $PROXY_PORT
# are existing Windows current user-level environment variables (your user)
# environment variables are UPPERCASE even in git bash
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active March 12, 2025 19:23
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class