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
@DeMarko
DeMarko / costs.md
Last active December 23, 2015 16:39
Android: Netrunner cost symbols

I've been playing Android: Netrunner for a couple months now, but this just clicked to me now so I figured I would share.

There are 3 different costs in A:N and they are significantly different and have different icons to indicate those differences.

Play Cost

Play Cost

You see this on Operations for the Corps and every card for the Runners.

Pretty straightforward: pay the cost, play the card.

Would it be possible to include an iCal file attachment to the Access-A-Ride advance notification emails with a 30 minute window from the specified pickup time (that is the window in which Access-A-Ride drivers need to arrive)?

For example: if my Access-A-Ride is supposed to pick me up at 10:34 am from 1000 Broadway Ave and then again at 8:00 pm from 900 Jay St., include a calendar event (a .ics file) that would look similar to the following, attached to the advance trip notification:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
@DeMarko
DeMarko / merge_by.php
Created March 1, 2013 18:36
mergeByFunction, mergeByProperty
<?php
/**
* Merge two arrays by extracting a key for each element with a function $f
* @param $f function which returns a scalar given any of the members of $array1 or $array2
* @param $array1
* @param ...
*
* @return array keyed by the output of $f on elements of the arrays passed in
*/
@DeMarko
DeMarko / redate.bash
Created July 1, 2012 06:35
Fix timestamps for JPGs ending in UNIX timestamp
#!/bin/bash
shopt -s nullglob
for f in *.jpg
do
# echo "fixing $f"
timestamp=`echo $f | perl -ne 'm/.*_?\d{4}-\d{2}-\d{2}_(\d+)\.jpg/; print $1'`
if [ $timestamp ]
then
@DeMarko
DeMarko / notification.json
Created February 16, 2012 06:55
example push notification for Hero Academy
{
"aps": {
"alert": "It is now your turn in your game with sazerac."
},
"actions": {
"1": "HKd9",
"2": "HKd9 c9",
"3": "HKc9 EBc8",
"4": "HKc9 EBc8",
"5": "HKc9 e9"
@DeMarko
DeMarko / Japanese style
Created August 19, 2011 16:55 — forked from endolith/Has weird right-to-left characters.txt
Unicode smileys emoticons
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(๏̯͡๏ )
(◕_◕)
@DeMarko
DeMarko / gist:1052405
Created June 28, 2011 22:27
Things wot may cheer people up
  • kittens and/or puppies
  • hugs
  • baked goods
  • pancakes
  • delicious food
  • board and/or card games
  • Firefly
  • adult beverages (let's hit the bar yo)
  • chocolate (milk and dark)
  • gouda cheese
@DeMarko
DeMarko / yahooweather.rb
Created December 13, 2010 06:47
short script that uses Yahoo!'s Weather API to retrieve the weather conditions for the given location
#!/usr/bin/env ruby
#---------------------------------
# Yahoo weather app using YQL/JSON
#---------------------------------
# based off of https://www.tropo.com/docs/scripting/t_ruby-yahooweather.htm
require 'rubygems'
require 'open-uri'
require 'json'
#Set the URI and our YQL select statement, then encode as a URI
@DeMarko
DeMarko / mtastatus.php
Created December 12, 2010 09:35
short script in PHP that takes command line args representing any of the MTA's subway lines and returns their current services status
#!/usr/bin/php
<?php
/**
* lineColor
* mostly for use with DeMarko's color extension of IRCCat
*
* @arg line string representing MTA Subway line
* @return string representing MTA Subway line color
*/
function lineColor($line) {
_ _ _______ __ _______ _______ ______ ______ ___ ______ __
| | | | ____\ \ / / | ____\ \ / / ____| _ \ \ / / __ ) / _ \| _ \ \ / /
| |_| | _| \ V / | _| \ \ / /| _| | |_) \ V /| _ \| | | | | | \ V /
| _ | |___ | | | |___ \ V / | |___| _ < | | | |_) | |_| | |_| || |_
|_| |_|_____| |_| |_____| \_/ |_____|_| \_\|_| |____/ \___/|____/ |_( )
|/
__ _____ _ _ ____ ____ _ _______ __
\ \ / / _ \| | | | / ___| _ \ / \ |__ /\ \ / /
\ V / | | | | | | | | | |_) | / _ \ / / \ V /
| || |_| | |_| | | |___| _ < / ___ \ / /_ | |