Skip to content

Instantly share code, notes, and snippets.

@bruzed
bruzed / gist:1438513
Created December 6, 2011 15:12
git commands
#display hidden branches
$ git branch -a
#checkout a branch
$ git checkout -b <branch-name> origin/<branch-name>
#tags
$ git tag -a 1.3.6.2 -m "bump version number"
$ git push --tags
@bruzed
bruzed / gist:1566955
Created January 5, 2012 20:00
ubuntu shell commands
#add program to startup list:
$ sudo update-rc.d <name of script in /etc/init.d> defaults
#add/remove scripts from autostart list
$ sudo rcconf
@bruzed
bruzed / gist:1633477
Created January 18, 2012 15:17
mongo shell commands
#import collections
$ mongoimport -d database -c collection filename.json
#export collections
$ mongoexport -d database -c collection > filename.json
@bruzed
bruzed / gist:2339662
Created April 8, 2012 20:19
everyday bash
#dump functions and stored procedures
$ mysqldump <other mysqldump options> --routines > outputfile.sql
#build gem
$ gem build [gem_spec]
#find and delete
$ find [source-name] -name [folder-to-delete] -exec rm -rf {} \;
#duplicate
@bruzed
bruzed / all_github_repos.sh
Created September 21, 2012 21:14
Clone all github repos for C4iOS examples and code
# ruby 1.8.7
$ sudo gem install json
$ curl -s https://api.github.com/users/C4Tutorials/repos | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'
$ curl -s https://api.github.com/users/C4Code/repos | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'
@bruzed
bruzed / docker-commands.sh
Last active September 13, 2017 18:39
Docker command cheatlist
# containers
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
docker container rm <hash> # Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers
@bruzed
bruzed / README.md
Created September 6, 2018 17:27 — forked from juancabrera/README.md
Creating a JavaScript build for AR Studio with Webpack and Babel

Creating a JavaScript build for AR Studio with Webpack and Babel.

Scripting in AR Studio might be difficult sometimes, having all the code in one file is not ideal, hard for collaboration and quite likely to be messy. Here is a simple guide to have a super simple web-like JavaScript build that allows you to have the all files and the structure you want.

Sample project (or use your own)

Get the sample project from this page (Mug.zip), unzip it and go to the Mug Finished Effect folder. Or, use your own project.

JavaScript build