Skip to content

Instantly share code, notes, and snippets.

@cajun-code
cajun-code / hooks.rb
Created December 7, 2020 16:29
Appium hooks for cucumber
AfterConfiguration do |config|
pid = spawn ‘appium --address 0.0.0.0 --port 4723’
Process.detach(pid)
sleep(10)
end
at_exit do
exec ‘/usr/bin/killall -KILL node’
end
@cajun-code
cajun-code / LevelManager.cs
Created April 22, 2016 21:05
Level Manager Unity 5.3.4
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;
public class LevelManager : MonoBehaviour {
public void LoadLevel(string name){
Debug.Log ("New Level load: " + name);
//Application.LoadLevel (name);
SceneManager.LoadScene(name);
@cajun-code
cajun-code / gitignore
Created January 8, 2016 01:42
Unity Gitignore
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
@cajun-code
cajun-code / settings.json
Last active September 11, 2015 19:31
VSCode User Unity Settings
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.meta":true,
"**/Library":true,
"**/obj":true,
"**/Temp":true,
"**/ProjectSettings": true,
@cajun-code
cajun-code / tw.gitconfig
Last active August 29, 2015 14:21 — forked from Fykec/tw.gitconfig
[diff]
tool = "twdiff"
[difftool]
prompt = false
[difftool "twdiff"]
cmd = /usr/local/bin/twdiff --wait --resume "$LOCAL" "$REMOTE"
[merge]
tool = "twdiff"
[mergetool]
@cajun-code
cajun-code / random_number.rb
Last active January 4, 2016 18:19
Rand Number Generator
#require "random"
print "Enter the number of guests:"
guests = gets()
print "Enter the number of prizes to give away:"
prizes = gets()
winners = []
prizes.to_i.times do
winner = Random.rand guests.to_i
while winners.include?(winner) # add if gap in number blocks winner > 29 and winner < 58
@cajun-code
cajun-code / patch_android.rb
Created May 30, 2013 00:05
Simlink new android build system into old directory to allow sbt scala-android to continue to work
Dir.chdir(File.absolute_path("#{ENV['ANDROID_SDK_HOME']}/build-tools/17.0.0/"));Dir.glob("*").each{|x| system "ln -s #{ENV['ANDROID_SDK_HOME']}/build-tools/17.0.0/#{x} #{ENV['ANDROID_SDK_HOME']}/platform-tools/#{x}"}
@cajun-code
cajun-code / erebus_rvm_setup
Created February 12, 2013 22:12
Eerbus RVM Setup
rvm use 1.9.3@erebus --create
gem install erebus
rvm wrapper 1.9.3@erebus ruby erebus
mv ~/.rvm/bin/ruby_erebus ~/.rvm/bin/erebus
@cajun-code
cajun-code / export_obj_c.py
Created December 22, 2012 19:43
Blender script for exporting models to objective c
#!BPY
"""
Name: 'Objective-C Header (.h)'
Blender: 244
Group: 'Export'
Tooltip: 'Exports header file for use with the OpenGL ES template for iPhone available from http://iphonedevelopment.blogspot.com/'
"""
import Blender
from Blender import *
module PixenToGameQuery
require 'RMagick'
include Magick
FPR = 12 # Frames per row in a sprite sheet generated by Pixen
COLPAD = 2 # Pix between each column of images on the sprite sheet
ROWPAD = 2 # Pix between each row of images on the sprite sheet
LEFTPAD = 4 # Extra pix on left of sprite sheet
RIGHTPAD = 20 # Extra pix on right of sprite sheet
BOTTOMPAD = 2 # Extra pix on bottom of sprite sheet