Skip to content

Instantly share code, notes, and snippets.

View ninjapanzer's full-sized avatar
🌋
Back to the FOSS

Paul Scarrone ninjapanzer

🌋
Back to the FOSS
View GitHub Profile
@ninjapanzer
ninjapanzer / config_editor.pseudo
Created March 1, 2016 13:49
config editor pseudo
// If we are initializing the file
argv = ["C:/config.exe", "init"]
// If we are editing first_name
argv = ["C:/config.exe", "edit", "cypher"]
BEGIN
if argv[1] == "init"
string first_name = ""
open file "./config" for writing
do
output "Enter first name"
@ninjapanzer
ninjapanzer / event.js
Last active April 26, 2016 21:22
Timezone_Rails
//eonasdan-bootstrap-datetimepicker
jQuery('#datetimepickerStart').datetimepicker({
sideBySide: true
});
jQuery('#datetimepickerStop').datetimepicker({
sideBySide: true,
useCurrent: false //Important! See issue #1075
});
jQuery('#datetimepickerStart').on('dp.change', function (e) {
@ninjapanzer
ninjapanzer / main.cpp
Last active February 13, 2016 20:02
Use pointers to alias std::cin and std::cout
#include <iostream>
int main() {
// Create a std::istream pointer and assign it where cin is bound
std::istream *in;
in = &std::cin;
// Create a std::ostream pointer and assign it where cout is bound
std::ostream *out;
out = &std::cout;
@ninjapanzer
ninjapanzer / noMatch.js
Created February 8, 2016 00:13
Simple Module ES6
import React from "react"
export default React.createClass({
render: function(){
return(<div>NOPE</div>)
}
});
@ninjapanzer
ninjapanzer / fixed_example_render.png
Last active January 26, 2016 05:00 — forked from LessWig/spaceblock.js
Space Block code
fixed_example_render.png
@ninjapanzer
ninjapanzer / warrior5.js
Created October 15, 2015 13:34
JSWarrior Stage 5
jsWarrior.turn = function(warrior) {
if(!warrior.healing && warrior.getHealth() < 8){
warrior.walk("backward")
warrior.healing = true;
} else if(warrior.check() == "enemy") {
warrior.attack();
} else if(warrior.check() == "diamond"){
warrior.collect();
} else if(warrior.getHealth() < 20 && warrior.healing ){
warrior.rest();
@ninjapanzer
ninjapanzer / Car.java
Last active October 12, 2015 19:59
Car Class with Tests
package javaapplication30;
/**
* a class that shows a cars model year, the company and model of the car as
* well as the cars speed
*/
public class Car {
private int modelYear, speed;
private String makeModel;
@ninjapanzer
ninjapanzer / Gemfile
Created October 5, 2015 00:32 — forked from fairchild/Gemfile
An example sinatra omniauth client app
source :rubygems
gem 'sinatra'
gem 'json'
gem 'omniauth'
gem 'omniauth-oauth2'
gem 'omniauth-github'
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__)
gem 'thin'
@ninjapanzer
ninjapanzer / intro_to_programming.md
Last active September 22, 2015 22:45
Intro To Programming Syllabus
@ninjapanzer
ninjapanzer / sync.sh
Created September 1, 2015 01:42
One way force push to reset github fork
SOURCE_BRANCH=`git rev-parse --abbrev-ref HEAD`
syncBranch(){
echo "Syncing to $1 $2"
DEST_BRANCH=$1
DEST_REMOTE=$2
git checkout $DEST_BRANCH
# Make sure we actually made it to the destination branch
if [ `git rev-parse --abbrev-ref HEAD` != $DEST_BRANCH ]; then