Skip to content

Instantly share code, notes, and snippets.

View zmughal's full-sized avatar
🌿
fiddling with attribute grammars.

Zaki Mughal [sivoais] zmughal

🌿
fiddling with attribute grammars.
View GitHub Profile
@akkornel
akkornel / instructions.md
Created February 16, 2017 01:49
Using MacPorts to package software for distribution

Hello!

This document talks about how to use MacPorts to make a macOS installer packages that will install multiple MacPorts ports onto a system.

MacPorts is a project which takes open-source software and builds it for macOS. It takes care of the work of identifying and patching any macOS-specific problems, working out how best to do the build, etc..

Normally, you install MacPorts on your local system, and use the Terminal to install ports (a port is an individual software offering). However, it is also possible to use MacPorts to build macOS installer packages (.pkg files). MacPorts can also bundle multiple ports into a single package (an .mpkg file), so you can install multiple ports in a single action. The ability to make .mpkg files is useful, because ports typically depend on other ports in order to function properly.

This document describes the process for making .mpkg files, so that you can distribute them to systems.

@raineorshine
raineorshine / human-readable-hash-comparisons.md
Last active July 21, 2024 20:31
An aesthetic comparison of a few human-readable hashing functions.

An Aesthetic Comparison of Human-Readable
Hashing Functions

The following compares the output of several creative hash functions designed for human readability.

sha1's are merely used as arbitrary, longer, distributed input values.

input 1 word output 2 word output 3 word output
@spookylukey
spookylukey / stackoverflow_docs_no_thanks.rst
Last active January 31, 2017 12:31
Stackoverflow docs no thanks (at least for Django)

I'm talking about this: http://stackoverflow.com/documentation/django

Compared to well written documentation, this kind of documentation is pretty bad. Yes, many projects have terrible documentation, and for them it might be an improvement, but for many that have good docs, this is a major step backwards.

Good documentation requires serious effort and organisation. It can't be achieved by throwing together lots of examples.

@toolboc
toolboc / quakeinstaller.sh
Last active March 27, 2017 20:23
Quake on Bash on Ubuntu on Windows
#!/bin/bash
#Quake on Bash on Ubuntu on Windows
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, try running again with sudo"; exit 1; }
#ensure Xming is installed
if [ -f "/mnt/c/Program Files (x86)/Xming/Xming.exe" ]
then
echo "XMing is installed on Windows Filesystem, please ensure that it is running";
else
@QuantumGhost
QuantumGhost / example.puml
Last active June 18, 2025 14:09
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@dbiesecke
dbiesecke / Dockerfile
Created December 30, 2015 16:27
Jupyter with IPerl
# Use offical jupyter image and added iperl
# docker run --rm -it -p 8000:8888 -v "$(pwd):/notebooks" nated/jupyter
FROM jupyter/notebook
MAINTAINER Daniel Biesecke <[email protected]>
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
libzmq3-dev libmagic-dev cpanminus
RUN git clone https://github.com/EntropyOrg/p5-Devel-IPerl.git /iperl
@coke
coke / gist:dc55e617e76a6f7082f9
Last active December 25, 2015 17:32
Christmas release plans
Christmas - 2015-12-25.
This is the monthly compiler release, the first to target the 6.c specification.
Will include notes about what the 6.c spec means; hopefully how to get an extracted copy; potentially just a reference to the roast repo.
There is no specific time planned for the release. Please be patient. Thank you.
In addition to the compiler release announcement we normally make, I'll repost the announcement for this release on the Advent calendar.
@joepie91
joepie91 / vpn.md
Last active August 26, 2025 10:40
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@joar
joar / jq-insert-var.sh
Last active July 24, 2025 14:46
Add a field to an object with JQ
# Add field
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}'
# {
# "hello": "world",
# "foo": "bar"
# }
# Override field value
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}'
{