Skip to content

Instantly share code, notes, and snippets.

Looking for a developer job in the military/airspace area [RQTH]

Diti Marguin Diti

Looking for a developer job in the military/airspace area [RQTH]
Block or report user

Report or block Diti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ddevault / Makefile
Last active Jan 27, 2020
Tiny Wayland compositor
View Makefile
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
scottrbaxter /
Last active Oct 17, 2019
1password cli session check and expiration variable
#!/usr/bin/env bash
# starts (or restarts) a 1password cli session, sets 30 minute countdown variable
# use: OP_CLOUD_ACCOUNT="[your-account-name]" source /path/to/ command
# e.g.: OP_CLOUD_ACCOUNT="familyname" source ~/ get account
# attempt sign in if session is not active
Jamesits /
Last active Dec 22, 2019
Install Caddy Server on Ubuntu with Systemd.
# Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+.
# This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading.
# Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line.
apt install curl
curl | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls.
rock3r /
Last active May 10, 2019
A simple bash script to enable demo mode on a Marshmallow+ device via ADB (based on


$ demo on|off [hhmm]

Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM format (only used when you use the on command).

⚠️ This script only works on *nix systems and has only been tested on macOS with Bash (but should be portable).

View cwebp_arguments_1.txt
cwebp -pass 10 -mt -alpha_filter best -alpha_cleanup -m 6 -lossless
What do all these arguments do?
-pass 10 Determines the number of passes that will be performed on the image, maximum 10. More = longer processing time, but potentially smaller images. Yum.
-mt Use multi-threading
-alpha_filter best "predictive filtering for alpha plane", tries to optimize the alpha channel. Options are none, fast, and best.
-m 6 Determines compression method. 0=fast, 6=slowest
-lossless Makes this WebP lossless. Image produced will be 100% identical once decompressed.
eliquious /
Created Jan 4, 2016
Golang OpenPGP examples


go build -o goencrypt main.go

Generating Keys

mbostock / .block
Last active Nov 11, 2016
A Less-Angry Rainbow
View .block
license: gpl-3.0
aras-p / preprocessor_fun.h
Last active Jan 29, 2020
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
cmcsun / Entire Guide
Last active Oct 16, 2019
May the Force be with You: A tulpa creation guide by Methos
View Entire Guide
May the Force be with You
A Tulpa Creation Guide
by Methos
Twitter: @GGMethos
Last Edit: 28-Sep-2017
The following work falls under the Creative Commons Attribution 4.0 International (CC BY 4.0) License. The official terms of the license can be seen here:
package mdesl.swipe;
import com.badlogic.gdx.utils.Array;
* A simple extension of Array that allows inserting an element
* at the head (index 0) without ever growing the backing array.
* Elements are shifted right and eventually discarded to make
* way for new additions.
You can’t perform that action at this time.