Skip to content

Instantly share code, notes, and snippets.

🎯
Focused

Craig Davison davisonio

🎯
Focused
Block or report user

Report or block davisonio

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
View javafx-music-functions.java
*/* 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 Jun 18, 2016
Prevent your web server (apache, nginx) from serving the /.git/ directory.
View apache
# Put this in your .htaccess file in the root of the website.
RedirectMatch 404 /\.git
View keybase.md

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 Feb 5, 2016
Let's Encrypt commands - v0.2.0
View letsencrypt-commands.txt
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
View slack2html.php
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@davisonio
davisonio / mod_debug.lua
Last active Aug 29, 2015 — forked from rubenwardy/mod_debug.lua
Craft recipe checker for Minetest
View mod_debug.lua
-- 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 Feb 5, 2016
minetestmapper settings for Minetest
View minetestmapper.txt
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 Feb 5, 2016
Merge a GitHub PR without a merge commt
View github-merge.sh
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 Aug 29, 2015
Really shitty capture the flag game in Java.
View shitty-capture-the-flag-game.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 Feb 5, 2016
Records of achievement on GitHub. - outdated
View github-records.md

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.

You can’t perform that action at this time.