Skip to content

Instantly share code, notes, and snippets.

View ChildishGiant's full-sized avatar

Allie ChildishGiant

  • Cambridge, Uk
View GitHub Profile
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/\2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
@ChildishGiant
ChildishGiant / HOWTO.md
Created January 13, 2019 20:41 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@ChildishGiant
ChildishGiant / Easy_xkcd.svg
Last active April 29, 2018 15:53
Easy xkcd logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am childishgiant on github.
  • I am childishgiant (https://keybase.io/childishgiant) on keybase.
  • I have a public key ASBOVEnsvFIQINAJ2HTCFe0MiKgkxVMPZi1GzEkmYqNlIAo

To claim this, I am signing this object:

@ChildishGiant
ChildishGiant / compareVersions.js
Last active January 2, 2018 00:52
For comparing semantic versions
function compareVersions(v1, v2) { // Returns the larger of the two. or "equal"
v1Array = v1.split(".");
v2Array = v2.split(".");
for(var i=0; i<v1Array.length;i++){v1Array[i] = parseInt(v1Array[i])};
for(var i=0; i<v2Array.length;i++){v2Array[i] = parseInt(v2Array[i])};
if (v1Array.length != 3 || v2Array.length != 3){
return "Both versions need to be x.y.z";
} else {
if (v1Array[0]>v2Array[0]){
@ChildishGiant
ChildishGiant / isaac-seeds.py
Created September 21, 2016 14:56
A simple script to generate seeds for The Binding of Isaac: Rebirth
import random
__author__ = 'SolarPolarMan'
# https://twitter.com/solarpolarman
# https://www.youtube.com/solarpolarman
# https://steamcommunity.com/id/solarpolarman
# https://www.reddit.com/user/SolarPolarMan/
@ChildishGiant
ChildishGiant / myApps.md
Last active August 28, 2020 13:13
List of apps I use.

Reference

App Name - Platform(s) - Website - Source*

Platform key: a = android | d = .deb | i = ios | m = mac OSX | w = windows | x = Web app

Music

Google Play - Windows, Linux, Mac - Source (Electron)