Skip to content

Instantly share code, notes, and snippets.

View jasonsturges's full-sized avatar

Jason Sturges jasonsturges

View GitHub Profile
@jasonsturges
jasonsturges / .gitignore
Created July 16, 2020 03:29
Unity git ignore
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
@jasonsturges
jasonsturges / Command line
Last active August 31, 2022 02:50
Wiki.js
$ docker-compose up
Creating network "docker_default" with the default driver
Creating docker_wikidb_1 ... done
Creating docker_wikijs_1 ... done
Attaching to docker_wikidb_1, docker_wikijs_1
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=468ee589b69d
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] db version v3.6.5
wikidb_1 | 2018-06-22T04:28:15.063+0000 I CONTROL [initandlisten] git version: a20ecd3e3a174162052ff99913bc2ca9a839d618
wikidb_1 | 2018-06-22T04:28:15.064+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
wikidb_1 | 2018-06-22T04:28:15.064+0000 I CONTROL [initandlisten] allocator: tcmalloc
@jasonsturges
jasonsturges / build-hxcpp.sh
Created March 29, 2017 22:02
Build and install Haxe Foundation hxcpp haxelib for macOS from latest GitHub commit
#!/bin/bash
#### Description: Build and install Haxe Foundation hxcpp haxelib for macOS
#### from latest GitHub: https://github.com/HaxeFoundation/hxcpp
#### Written by: Jason Sturges - jason@jasonsturges.com on 2017-03-29
haxelib remove hxcpp
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git
cd /usr/local/lib/haxe/lib/hxcpp/git/tools/hxcpp
@jasonsturges
jasonsturges / index.html
Last active January 6, 2017 19:12
Flexbox masonry grid, similar to 500px image layout, from example: https://github.com/xieranmaya/blog/issues/6
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=1080">
<title>Cats</title>
<style>
body {
margin: 0;
overflow-x: hidden;
}
@jasonsturges
jasonsturges / photo-resize.jsx
Created June 16, 2016 19:22
Scale images to multiple sizes in Photoshop using JSX scripted batch processing automation
#target "photoshop"
if (BridgeTalk.appName == "photoshop") {
app.bringToFront();
var inputFolder = Folder.selectDialog("Select the folder containing photos to be resized."),
imageSizes = [2048, 1024, 512, 256];
if (inputFolder != null) {
var fileList = inputFolder.getFiles(/\.(jpg|jpeg|tif|psd|)$/i);
@jasonsturges
jasonsturges / readme.md
Created November 5, 2014 22:10
Referencing RequireJS config instance

RequireJS config may be referenced via:

var config = requirejs.s.contexts._.config;

Given a require such as:

require.config({
    property: "value"
});
@jasonsturges
jasonsturges / readme.md
Created September 10, 2014 17:39
Toggle hidden files Automator script for Mac OS X

To start, open up Automator (in the Applications folder) and choose a Service template. From the library choose "Run Shell Script" and drag it across to the workflow area. In the text box paste the following command:

STATUS=`defaults read com.apple.finder AppleShowAllFiles`
if [ $STATUS == YES ]; 
then
    defaults write com.apple.finder AppleShowAllFiles NO
else
    defaults write com.apple.finder AppleShowAllFiles YES
fi

killall Finder

@MenuItem ("Terrain/Object to Terrain")
static function Object2Terrain () {
// See if a valid object is selected
var obj = Selection.activeObject as GameObject;
if (obj == null) {
EditorUtility.DisplayDialog("No object selected", "Please select an object.", "Cancel");
return;
}
if (obj.GetComponent(MeshFilter) == null) {
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@jasonsturges
jasonsturges / .gitignore
Last active October 30, 2020 16:13
Global .gitignore
# JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
## Directory-based project format
.idea/
## File-based project format
*.ipr
*.iws
*.iml
# Visual Studio Code
.vscode/