Skip to content

Instantly share code, notes, and snippets.

View Spaxe's full-sized avatar
🏹

Xavier Ho Spaxe

🏹
View GitHub Profile
// Used to generate Texture Array asset
// Menu button is available in GameObject > Create Texture Array
// See CHANGEME in the file
using UnityEngine;
using UnityEditor;
public class TextureArray : MonoBehaviour {
[MenuItem("GameObject/Create Texture Array")]
static void Create()
@Spaxe
Spaxe / CSV to GeoJSON.ipynb
Created November 3, 2017 03:43
Converting CSV to GeoJSON Python Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spaxe
Spaxe / index.html
Last active September 13, 2021 01:12
WebGL 2.0 RGB Triangle Example
<!DOCTYPE html>
<html>
<head>
<title>WebGL 2.0 Simple Example</title>
</head>
<body style="margin: 0">
<canvas id="draw-target"></canvas>
<script type="vertex" id="vs">
#version 300 es
@Spaxe
Spaxe / .jshintrc
Created March 12, 2015 04:01
JSHint Options for p5js
{
// The plugin looks for a .jshintrc file in the same directory as the source
// file you're prettifying (or any directory above if it doesn't exist, or in
// your home folder if everything else fails) and uses those options along
// the default ones.
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
// Documentation: http://www.jshint.com/docs/options/
"browser": true,
@Spaxe
Spaxe / a_few_lines_of_text.txt
Created December 4, 2019 02:07
Intro to Python
This file contains just a few lines of text.
Not a lot.
Just a few.
@Spaxe
Spaxe / .block
Last active September 3, 2018 02:38
d3 stacked chart
license: mit
height: 300
scrolling: no
@Spaxe
Spaxe / apache.log
Created July 27, 2017 05:15
Baddie sniffing my server
This file has been truncated, but you can view the full file.
::ffff:54.66.187.126 - - [08/Jun/2017:11:01:54 +0000] "GET / HTTP/1.1" 302 52 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
::ffff:54.66.187.126 - - [08/Jun/2017:11:01:54 +0000] "GET / HTTP/1.1" 302 52 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
::ffff:54.66.187.126 - - [08/Jun/2017:11:01:54 +0000] "GET / HTTP/1.0" 302 40 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
::ffff:54.66.187.126 - - [08/Jun/2017:11:02:49 +0000] "GET / HTTP/1.1" 302 52 "-" "-"
::ffff:54.66.187.126 - - [08/Jun/2017:11:02:49 +0000] "GET https://charizard.it.csiro.au/ HTTP/1.1" 302 81 "-" "-"
::ffff:54.66.187.126 - - [08/Jun/2017:11:04:05 +0000] "GET / HTTP/1.0" 302 40 "-" "-"
::ffff:54.66.187.126 - - [08/Jun/2017:11:04:05 +0000] "GET / HTTP/1.0" 403 - "-" "-"
::ffff:54.66.187.126 - - [08/Jun/2017:11:04:15 +0000] "GET / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
::ffff:54.66.187.126 - - [08/Jun/2017:11:04:15 +0000] "GET /
@Spaxe
Spaxe / index.html
Created May 9, 2018 00:34
Example ticks only at the end with time
<!DOCTYPE html>
<meta charset="utf-8">
<svg width="960" height="500"></svg>
<script src="//d3js.org/d3.v4.min.js"></script>
<script>
var svg = d3.select("svg"),
margin = {top: 20, right: 0, bottom: 20, left: 0},
width = svg.attr("width") - margin.left - margin.right,
height = svg.attr("height") - margin.top - margin.bottom,
@Spaxe
Spaxe / index.html
Created August 23, 2017 11:09
This version works
<!DOCTYPE html>
<html>
<body>
<script src="https://unpkg.com/geobuf@3.0.0/dist/geobuf.js"></script>
<script src="https://unpkg.com/pbf@3.0.5/dist/pbf.js"></script>
<script>
const data = {
"type": "FeatureCollection",
"features": [
{
@Spaxe
Spaxe / printRunCommandOptions.js
Created November 11, 2011 06:37
Print all available options for MongoDB's db.runCommand()
// Prints all available command from db admin, db.runCommand options
// Usage: mongo < printRunCommandOptions.js
use admin;
for (var cmd in db.getCollection("$cmd")) {
print(cmd);
}