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 / 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
@ninjapanzer
ninjapanzer / Arrows.java
Created August 29, 2015 05:16
Animated Java Arrow
public class Arrows {
public static void main(String[] args) throws InterruptedException {
while(true){
for(int i = 0; i < 50; i++){
String line = "";
for(int j = 0; j<i; j++){
line += "@@";
}
for(int j = 0; j<50-i; j++){
@ninjapanzer
ninjapanzer / deploy.sh
Created August 29, 2015 03:10
Simple Shell Script to Deploy to gh-pages with bower dependencies
#!/bin/sh
SOURCE_BRANCH=`git rev-parse --abbrev-ref HEAD`
DEST_BRANCH=gh-pages
git checkout $DEST_BRANCH
# Make sure we actually made it to the destination branch
if [ `git rev-parse --abbrev-ref HEAD` != $DEST_BRANCH ]; then
echo "!!!! Something went wrong check the errors above and try again !!!!"