Skip to content

Instantly share code, notes, and snippets.

View vieko's full-sized avatar
Summoning Demons

Vieko Franetovic vieko

Summoning Demons
View GitHub Profile
@vieko
vieko / Craft3ValetDriver.php
Created January 3, 2018 01:18
Valet Driver for Craft 3 - handles Simple Asset Versioning for local development
<?php
class Craft3ValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return bool
@vieko
vieko / create_labels.sh
Last active December 18, 2017 23:08 — forked from omegahm/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
BR ZOMBIES 2.0
19 LAND
3 Verdant Catacombs
3 Bloodstained Mire
2 Marsh Flats
4 Swamp
1 Bayou
3 Badlands
2 Phyrexian Tower
Copyright © 2015 Skystone International LP. All Rights Reserved.
@vieko
vieko / twitter-widget.html
Created March 9, 2016 18:42
Twitter Widget Portion for Gambitious Dashboard
<div class="divider">
<h3 class="divider-content divider-heading">Latest from Twitter</h3>
</div>
<div class="panel panel-default">
<div class="panel-body">
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/GambitiousInc" data-widget-id="705142830147117056" data-chrome="nofooter noborders" height="450">Tweets by @GambitiousInc</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
@vieko
vieko / pivotal-tracker-rules.md
Last active August 29, 2015 14:19
Pivotal Tracker Story Rules

STORY TITLE

  • syntax: <subject><verb><object>[modifier]
  • Subject: author, admin, developer, reader, visitor, editor, approver, user
  • Verb: always in the present tense: creates, clicks, sees, sends
  • Object: terminology / informal entities: message, payment info, work order
  • modifier: optional, must add relevant detail, keep to a minimum

STORY DESCRIPTION

  • includes the motivation of the feature
  • the acceptance criteria
@vieko
vieko / regex-loc-formats
Created April 8, 2015 22:31
Regular Expressions for Location Formats
lsd:
/\D*([0-9]{1,2}|sw|nw|ne|se)\D+([0-9]{1,2})\D+([0-9]{1,3})\D+([0-9]{1,2})\D*(w|e)([0-9])/i
uwi_lsd:
/\D*(1[0-9A-Z]{2})\D+([0-9]{1,2})\D+([0-9]{1,2})\D+([0-9]{1,3})\D+([0-9]{1,2})\D*(w|e)([0-9])\D([0-9]){2}/i
uwi_nts:
/\D*(2[0-9A-Z]{2})\W+([A-D]{1})[\s|\-]*(\d+)[\s|\-]*([A-L]{1})[\s|\/|\-]*([0-9]+)[\s|\-]*([A-P]{1})[\s|\-]*([0-9]+)\D([0-9]){2}/i
nts:
/Users/vieko/Documents/Sandbox/evented/mpa/todos/app
/Users/vieko/.meteor/packages/meteor-tool/.1.0.43.i30qyr++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node
/Users/vieko/.meteor/package-metadata/v2.0.1/packages.data.db-shm
/Users/vieko/.meteor/packages/meteor-tool/.1.0.43.i30qyr++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/bin/darwin-x64-v8-3.14/fibers.node
/Users/vieko/.meteor/packages/meteor-tool/.1.0.43.i30qyr++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/build/Release/pathwatcher.node
/Users/vieko/.meteor/packages/meteor-tool/.1.0.43.i30qyr++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/sqlite3/lib/binding/node-v11-darwin-x64/node_sqlite3.node
/usr/lib/dyld
/private/var/db/dyld/dyld_shared_cache_x86_64
/dev/ttys000
/dev/tty
@vieko
vieko / gist:9085957
Created February 19, 2014 04:11
auto increment version number in Xamarin
#!/usr/bin/perl
my $version = `/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "Info.plist"`;
if ($version =~ /(\d+)\.(\d+)\.(\d+)/) {
my $major = ($2 >= 99) ? int($1) + 1 : 0;
my $minor = ($3 >= 99) ? int($2) + 1 : 0;
my $rev = ($3 >= 99) ? 0 : int($3) + 1;
my $result = `/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $major.$minor.$rev" "Info.plist"`;
}
@vieko
vieko / KRUNCH Build Command
Created June 20, 2012 17:00
Sublime Text 2 Build Command for AS3 Project
{
"cmd": ["/Users/vieko/Resources/flex_sdk_4/bin/mxmlc", "-o", "$project_path/bin/Krunch.swf", "-file-specs", "$project_path/src/Main.as", "-benchmark", "-incremental=false", "-debug=true", "-optimize=false", "-use-network=false"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.actionscript"
}