Skip to content

Instantly share code, notes, and snippets.

View bsamuels453's full-sized avatar

Benjamin Samuels bsamuels453

View GitHub Profile
#!/bin/bash
start () {
start-stop-daemon \
--chuid pikatwo-usr \
--user pikatwo-usr \
--chdir "/home/pikatwo-usr/Pikatwo" \
--start \
--startas "/usr/bin/mono" \
--background \
namespace X81-Prototype
module Control =
open SFML.Window;
open SFML.Graphics;
open System;
open System.Diagnostics;
let getKeyState keyboardState desiredKey =
let matchKey key keyComp =
#include <cstdlib>
#ifndef _DEBUG
# undef NULL
# define NULL (TheBomb ())
# define CRASH_FREQUENCY 100000
struct TheBomb
{
template<typename TValue>
operator TValue* () const throw ()
{
{
"IntroPhrases" : [
"Let the games begin!", "Sweet Jesus!",
"Not that!", "At last!",
"Land o' Goshen!", "Is that all?",
"Cheese it, the cops!", "I never dreamed it could be",
"If I do, you won't respect me!", "Now!",
"Open sesame!", "EMR!",
"Again!", "Faster!",
"Harder!", "Help!",
\documentclass[12pt]{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[usenames]{color}
\usepackage{pstricks}
@bsamuels453
bsamuels453 / c++ fizzbuzz
Last active December 15, 2015 20:09
i used c++ once and it was awful
#define X(a,b,c) class c{};
template<int i>class G<i,a,b>{public:typedef c Y;};
template<int i>class I{ };
template<int i,bool A,bool B>
class G{
public:typedef I<i>Y;
};
let rec factorial n =
match n with
| n when (n < 1) -> 1
| n -> n * factorial (n-1)
void towngen::getPocketsFromMap( vec1<vec1<int> >* map, vec1<pocket_s>* pockets, int threshvalue){
for(int x=0; x < map->size(); x++){
for(int y=0; y < map->size(); y++){
if( (*map)[x][y]>threshvalue ){
bool alreadyFactored=false;
for(int i=0; i<pockets->size(); i++){//these loops check each point against the points in each already-made pocket, and doesnt run the pocket creation if it is
for(int si=0; si< (*pockets)[i].memberCoords.size(); si++){ //the member of another pocket
if( x == (*pockets)[i].memberCoords[si].x && y == (*pockets)[i].memberCoords[si].y ){
alreadyFactored=true;
@bsamuels453
bsamuels453 / asdasdas
Created March 26, 2013 20:42
dsaddasd
Chuunibyou
Share on twitter Share on facebook Share on more
306 up, 11 down
A Japanese slang term which roughly translates to "Middle School 2nd Year Syndrome". People with chuunibyou either act like a know-it-all adult and look down on real ones, or believe they have special powers unlike others.
This is a common stage in growth; for most people, it happens--you guessed it--around the 2nd year of middle school (Grade 8 in Japan). However, the problem is, there are some grown-ups who have this symptom.
There are 3 main types of Chuunibyou. DQN-type pretends to be antisocial even though they aren't, or can't be and has made-up stories about antisocial behavior. Subculture-type prefers subculture or minor trends just to be different and have the "cool" factor. Evil Eye-Type admires mystical powers and pretends to have one of their own, to the extent of establishing an alias just for that.
And if you think you have one of these or want more information in the subject, a good idea is to read the "Chuunibyo
@bsamuels453
bsamuels453 / gist:5136950
Created March 11, 2013 19:30
i want to die
if (useNearPts) {
if (lowerPts[0].Position.X < upperPts[0].Position.X) {
p1 = upperPts[0].Position;
p2 = Lerp.Trace3X(upperPts[0].Position, lowerPts[0].Position, cuttingLine);
p3 = Lerp.Trace3X(lowerPts[0].Position, lowerPts[1].Position, cuttingLine);
p4 = Lerp.Trace3X(lowerPts[0].Position, lowerPts[1].Position, upperPts[0].Position.X);
n1 = upperPts[0].Normal;
n2 = InterpolateNorm(upperPts[0].Normal, lowerPts[0].Normal, upperPts[0].Position, lowerPts[0].Position, p2);
n3 = InterpolateNorm(lowerPts[0].Normal, lowerPts[1].Normal, lowerPts[0].Position, lowerPts[1].Position, p3);