Skip to content

Instantly share code, notes, and snippets.

James R Lowrey JarLowrey

Block or report user

Report or block JarLowrey

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
JarLowrey / vs_code_settings.json
Created Apr 9, 2018
Visual Studio Code personal settings
View vs_code_settings.json
"terminal.integrated.shellArgs.linux": [ //login shell
"files.associations": {
"*": "markdown", #Middleman
// "*.jsx": "javascript"
JarLowrey / benchmark_ruby_string_id_creation.rb
Created Jul 16, 2017
Benchmark for Ruby String ID creation
View benchmark_ruby_string_id_creation.rb
require 'benchmark'
#RESULTS - 100k iterations
# user system total real
# 0.590000 0.000000 0.590000 ( 0.594802) <- create_id_num - int to radix
# 0.270000 0.000000 0.270000 ( 0.267420) <- create_id_str - choosing random characters
@radix = ('0'..'9').to_a + ('a'..'z').to_a + ['$','-','_','+','!','*','(',')',','] #URL safe, lowercase characters
def self.custom_radix_to_s val, digits
JarLowrey / exporter.xml
Last active May 4, 2017
Physics Editor exporter for Godot Game Engine. Written by @aombk, re-hosted here. Unzip in C:\Program Files\CodeAndWeb\PhysicsEditor\resources\exporters -
View exporter.xml
<!-- identifier of the exporter -->
<!-- name for the dropbox -->
<displayName>Godot XML Exporter</displayName>
<!-- description of the exporter -->
<description>Godot XML Exporter by aombk</description>
JarLowrey /
Last active Mar 29, 2017
convert most video files around, supports "gif". Can customize ffmpeg options. Use via "sh filename outputExtension"
echo $0
#with help from QA -
#required dependencies
#sudo apt-get install imagemagick
#sudo apt-get install ffmpeg
JarLowrey / GoogleGeocoder.html
Created Mar 11, 2017
Make automatic, parallel requests to Google Maps to quickly find all your places
View GoogleGeocoder.html
<!DOCTYPE html>
<title>Geocoding service</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<script src=""></script>
<!-- replace API key below -->
<script type="text/javascript" src=""></script>
JarLowrey /
Last active Feb 9, 2017
Get your Atom editor bootstrapped and ready for best-practices
# Auto-run via:
# sh -c "$(curl -fsSL"
echo "Downloading some awesome Atom packages. See the code at"
apm install linter # - available linters:
apm install highlight-selected #
JarLowrey / asset_links.txt
Created Aug 22, 2016
Links to copy-right free asset repositories
View asset_links.txt
JarLowrey /
Last active Apr 21, 2016
Use SoX to batch convert audio files to a different format. First arg is currently existing format, second arg is the new audio format. All files will go into a new folder. Example: sh wav ogg -> will convert all .wav files in current directory to .ogg files, and place them in a folder named 'ogg'.
mkdir $2
#adds a '.' to the beginning of the passed in string, if it is not already there
add_dot_to_beginning_of_args () {
initialLetter="$(echo $1 | head -c 1)"
JarLowrey / concatenate_imgs_in_subdirectories.bash
Last active Jul 19, 2016
Searches in subdirectories for png files with names "frame-1.png", "frame-2.png"... and so on. Then makes a horizontal or vertical spritesheet out of the individual frames.
View concatenate_imgs_in_subdirectories.bash
#Directory setup: Individual images constituting one spritesheet must be by themselves in their own directory.
# All images must be '.png' files with that extension in their name.
# In a spritesheet directory, the images must be name frame-1.png thru frame-LAST_FRAME_NUMBER.png
#utilizes ImageMagick for spritesheet creation
JarLowrey / phaser_preloading_spritesheets_function_calls.bash
Last active Apr 7, 2016
Loop through all files in current directory. If ImageMagick thinks it is an image, output a preloading statement with that image's dimensions for the Phaser engine.
View phaser_preloading_spritesheets_function_calls.bash
echo $0 #this script requires ImageMagick, must be ran with bash
#copied from
echo $(printf %.f $(echo "scale=$2;(((10^$2)*$1)+0.5)/(10^$2)" | bc))
You can’t perform that action at this time.