Skip to content

Instantly share code, notes, and snippets.

View DeMarko's full-sized avatar
🏠
Working from home

Dannel Jurado DeMarko

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am DeMarko on github.
  • I am DeMarko (https://keybase.io/DeMarko) on keybase.
  • I have a public key whose fingerprint is 6014 4C00 7666 2B79 79D5 A28C 8E6A 7BE1 AE85 07CE

To claim this, I am signing this object:

@DeMarko
DeMarko / old_aar.js
Created March 13, 2014 04:41
This was the JS that was embedded in the old Access-A-Ride Reservation page. All of the inputs were checked client-side and never server-side
document.myForm.cmbPCA.value = '1';document.myForm.cmbPCA.disabled = false;document.myForm.chkAnimal.checked = false;document.myForm.chkAnimal.disabled = true;document.myForm.cmbXWide.value = 'No';
function cmdSubmit_OnClick() {
document.myForm.txtEquipment.value = getSelected(document.myForm.lstEquipment);
var myDate = new Date();
myDate.setDate(myDate.getDate());
var myHour = myDate.getHours();
var myTripDate = new Date(document.myForm.cmbTripDate.value);
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'json'
worldcup_url = 'http://footballdb.herokuapp.com/api/v1/event/world.2014/round/'
round_token = 'today'
if ARGV.first
if ARGV.first.to_i > 20
@DeMarko
DeMarko / gist:e7f201ec65186cfc4989
Created September 18, 2014 18:39
NetrunnerDB C&D

To anyone at Fantasy Flight whom it may concern:

I'll be honest, I can't say that I'm happy about writing this but I feel like I can't communicate with anyone at Fantasy Flight without putting words into this box.

I'm really disappointed with how FFG has dealt with this NetrunnerDB situation. I'm really into Netrunner, really, really into it. I think it's one of the best games that has been released this side of the decade.

One of the things that drew me to Netrunner was the amazing community that has embraced it. The previous card game community I was a part of was Magic: the Gathering and it never felt friendly or welcoming, just competitive and toxic, I eventually just stopped participating because across several states in different environments it still felt the same and I couldn't put up with it anymore.

I love the Netrunner community so much that I help run a meetup (@thelocalmeta on Twitter) and have previously written you about trying to set up our own tournament (with a tournament kit). You said

Shorter version

The Spaces Between is dedicated to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of participants in any form.

This code of conduct applies to all The Spaces Between spaces, including our Slack and games/events organized through our Slack, both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the Slack owners (@vogon, @demarko).

Some The Spaces Between spaces may have additional rules in place, which will be made clearly available to participants. Participants are responsible for knowing and abiding by these rules.

Longer version

The Spaces Between is dedicated to providing a harassment-free experience for everyone. We do not tolerate harassment of participants in any form.

# will highlight the term you are grepping for, works in bash and zsh
alias grep='GREP_COLOR="1;37;41" LANG=C grep --color=auto'
(* written by @chrisamaphone of chrisamaphone fame *)
val s_end = "\nval s_start = \"val s_end = \"\nfun quote #\"\\n\" = \"\\\\n\"\n\t| quote #\"\\\\\" = \"\\\\\\\\\"\n\t| quote c = Char.toString c\n\nfun q () = print (s_start ^ \"\\\"\" ^ (concat (map quote (explode s_end))) ^ \"\\\"\" ^ s_end)"
val s_start = "val s_end = "
fun quote #"\n" = "\\n"
| quote #"\\" = "\\\\"
| quote c = Char.toString c
fun q () = print (s_start ^ "\"" ^ (concat (map quote (explode s_end))) ^ "\"" ^ s_end)
#!/usr/bin/env ruby
# == Synopsis
# jsonpretty: a quick script for making JSON output legible
#
# == Usage
# jsonpretty [a JSON encoded file]
# [some stream with JSON text] | jsonpretty
#
# For this help use: jsonpretty -h
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
using namespace std;
char * remove_char_from_string(char *input_string, char given_char) {
char * newstring = (char *) calloc(strlen(input_string) + 1, sizeof(char));
@DeMarko
DeMarko / merge.cpp
Created November 7, 2010 03:13
quick example of a merge function in mostly-C C++
#include <iostream>
using namespace std;
int * Merge (int a[], int size_a, int b[], int size_b);
int main() {
int a[] = {1, 5, 8, 9, 13};
int b[] = {2, 6};
int * c = Merge(a, 5, b, 2);