Skip to content

Instantly share code, notes, and snippets.

/**
* Created by Heasummn on 12/20/2015.
*/
public class BFRunner {
public static void main(String[] args) {
Interpreter brainFuck = new Interpreter();
brainFuck.interpret("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+.");
}
}
#!/usr/bin/env python3
import os
while True:
args = input('> ').split()
line = args
os.execvp(args[0], line)
#include <iostream> // IO
#include <string> // String variable
#include <fstream> // File IO
#define HEAPSIZE 30000
// Prototypes
void lexer(std::string);
void parser(char);
void help();
#include <iostream>
#include <string.h>
void guessNumber();
bool isSolution(int);
bool tooHigh(int);
int main() {
guessNumber();
}
@Heasummn
Heasummn / Shell Run
Created June 30, 2016 06:29
Incorrect Executable type generated by llvmlite
>>> from llvmlite import ir
>>> from llvmlite import binding as llvm
>>> llvm.initialize()
>>> llvm.initialize_native_asmprinter()
>>> llvm.initialize_native_target()
>>> target = llvm.Target.from_default_triple()
>>> target.triple
'x86_64-pc-windows-msvc'
>>> llvm.get_object_format("x86_64-pc-windows-msvc")
@Heasummn
Heasummn / .vimrc
Last active September 10, 2016 01:20
vim config
" Set everything to a default
set nocompatible
let g:dotvim = "~/.vim/"
" Enable and use Pathogen
execute pathogen#infect()
call pathogen#helptags()
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#define LESSON_NAME_MAX 12
#define SCHOOL_DAYS_IN_WEEK 5
#define TEACHER_NAME_MAX 5
#define LESSONS_PER_DAY_MAX 8
public int factorial(int n)
{
int total = 1;
for(int i = 1; i < n; n++)
{
total *= i;
}
return total;
}
#include <stdio.h>
struct node
{
int data;
struct node * next;
};
int main()
{
@Heasummn
Heasummn / vexCode.c
Created January 10, 2018 23:52
Vex Code for our robot completely OP
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in1, armPent, sensorPotentiometer)
#pragma config(Sensor, I2C_1, , sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, , sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port1, backRight, tmotorVex393_HBridge, openLoop, reversed)
#pragma config(Motor, port2, frontLeft, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, leftIntake, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, rightLift, tmotorVex393_MC29, openLoop, encoderPort, I2C_2)
#pragma config(Motor, port5, claw, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port7, leftLift, tmotorVex393_MC29, openLoop, reversed, encoderPort, I2C_1)