Skip to content

Instantly share code, notes, and snippets.

View davisonio's full-sized avatar
🚀
Focusing

Craig Davison davisonio

🚀
Focusing
View GitHub Profile
@davisonio
davisonio / javafx-music-functions.java
Created January 12, 2018 16:44
JavaFX Music Functions
*/* CODE AT TOP OF CLASS SO THAT MEDIA PLAYER IS ACCESSIBLE EVERYWHERE */*
public static MediaPlayer songPlayer = null;
*/* CODE TO START PLAYING */*
File songFile = new File("Music/amazingsong.mp3"); // Music folder
should be in project root, not in 'src'
if (songFile.isFile()) {
@davisonio
davisonio / apache
Last active June 18, 2016 10:22
Prevent your web server (apache, nginx) from serving the /.git/ directory.
# Put this in your .htaccess file in the root of the website.
RedirectMatch 404 /\.git
@davisonio
davisonio / keybase.md
Created May 2, 2016 13:30
Keybase proof

Keybase proof

I hereby claim:

  • I am davisonio on github.
  • I am davisonio (https://keybase.io/davisonio) on keybase.
  • I have a public key whose fingerprint is F1D0 ACA4 6B5B 6B21 7613 201B 77C2 1102 FC13 06DF

To claim this, I am signing this object:

@davisonio
davisonio / letsencrypt-commands.txt
Last active February 5, 2016 19:00
Let's Encrypt commands - v0.2.0
usage:
letsencrypt [SUBCOMMAND] [options] [-d domain] [-d domain] ...
The Let's Encrypt agent can obtain and install HTTPS/TLS/SSL certificates. By
default, it will attempt to use a webserver both for obtaining and installing
the cert. Major SUBCOMMANDS are:
(default) run Obtain & install a cert in your current webserver
certonly Obtain cert, but do not install it (aka "auth")
install Install a previously obtained cert in a server
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@davisonio
davisonio / mod_debug.lua
Last active August 29, 2015 14:26 — forked from rubenwardy/mod_debug.lua
Craft recipe checker for Minetest
-- Written by rubenwardy, WTFPL
-- To use:
-- * Save as mod_debug.lua in builtin/game
-- * add dofile(gamepath.."mod_debug.lua") to the last line of builtin/game/init.lua
-- OR
-- * Install as a mod. Needs to be run before any other mod.
local mod = {}
mod.recipes = {}
mod.aliases = {}
@davisonio
davisonio / minetestmapper.txt
Last active February 5, 2016 18:32
minetestmapper settings for Minetest
Small map:
./minetestmapper -i ~/Documents/Gaming/Minetest/minetest-servers/worlds/server/ -o ~/Documents/Gaming/Minetest/maps/map-small.png --backend sqlite3 --drawscale --drawalpha --geometry -1000:-1000+2000+2000
Big map:
./minetestmapper -i ~/Documents/Gaming/Minetest/minetest-servers/worlds/server/ -o ~/Documents/Gaming/Minetest/maps/map-big.png --backend sqlite3 --drawscale --drawalpha --geometry -10000:-10000+20000+20000
@davisonio
davisonio / github-merge.sh
Last active February 5, 2016 18:32
Merge a GitHub PR without a merge commt
git checkout master
curl http://github.com/user/repo/pull/1.patch | git am
git push origin master
@davisonio
davisonio / shitty-capture-the-flag-game.java
Last active August 29, 2015 14:08
Really shitty capture the flag game in Java.
import sun.audio.*;
import java.awt.*;
import java.util.Random;
import java.awt.event.*;
import java.io.*;
public class CaptureTheFlag extends Frame implements KeyListener
@davisonio
davisonio / github-records.md
Last active February 5, 2016 18:31
Records of achievement on GitHub. - outdated

GitHub Records

Records of achievement on GitHub.

Largest Repository

The largest known repository on GitHub is located at: zhongfu/st and was created by zhongfu.

It appears to be a large collection of PDF files and in total the repository is over 22000000KB (22GB) in size.