Skip to content

Instantly share code, notes, and snippets.

View chasinglogic's full-sized avatar

Mathew Robinson chasinglogic

View GitHub Profile
@chasinglogic
chasinglogic / cubemaker.py
Created September 24, 2013 19:46
Code for a Magic: The Gathering Cube Maker I'm writing
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("Welcome To Mat's Super Duper Cube Maker")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("This application doesn't check card names or legality or anything like that\nNote that means if you misspell a name or enter a fake card.\nThis program won't know that it isn't real.")
print("It's a basic application that will make sure you get the right number of cards \nin your cube per color")
print("Then it prints your cube list to an easy to read Text File")
print("Currently it only supports 360 card cubes.")
print("Later functionality is planned to add things like cmc, power/toughness, etc.\n\n")
@chasinglogic
chasinglogic / index.css
Last active December 25, 2015 09:39
My First Website
#navbar {
width:100%;
float:left;
margin: 0 0 lem 0;
padding: 0;
background-color: black;
position:absolute;
}
#navbar ul {
list-style: None;
def string_analyzer(string):
first_num = ""
second_num = ""
x = False
print(string)
for letter in string:
if x == False:
if letter == "x" or letter == "X":
x = True
else:
@chasinglogic
chasinglogic / box.cpp
Last active December 27, 2015 21:18
First CPP attempts
#include <iostream>
#include <map>
using namespace std;
struct Card {
string name;
};
def string_reverser(string):
new_string = []
for letter in string:
new_string.insert(0, letter)
return "".join(new_string)
inpt = raw_input("What string to reverse? ")
print(string_reverser(inpt))
@chasinglogic
chasinglogic / calc.c
Created December 5, 2013 15:22
Attempt at making a dumb little calculator to help me learn c type conversions.
#include <stdio.h>
int add(int, int);
int analyze(char*);
int operate(char, int, int);
int main() {
char input[10];
printf("Welcome to mat's calculator 0.0.0.1\n");
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
pub fn gen_module(mut name: String, private: bool) {
let mut working_dir = env::current_dir().expect("Unexpected Error: Cannot get current working directory.");
// This makes sure that the name ends with .rs if not a directory
if is_file(&name) { name.push_str(".rs") }
for dir in name.split("/") {
if is_file(&dir) {
working_dir.push(name);
gen_file_module(working_dir.clone());
@chasinglogic
chasinglogic / keybase.md
Created October 11, 2017 15:33
keybase proof

Keybase proof

I hereby claim:

  • I am chasinglogic on github.
  • I am chasinglogic (https://keybase.io/chasinglogic) on keybase.
  • I have a public key ASDhkDXmfEb6IDdq_L2DoUotICx-IKhhye5NfH5blMYGHwo

To claim this, I am signing this object:

@chasinglogic
chasinglogic / simplerestapi.md
Created October 18, 2017 19:02
Build Simple REST API in Go.md

Build a simple REST API in Go

The Problem

You are going to build a simple REST API without a Database backend to serve some info about Movies.

The Code