Skip to content

Instantly share code, notes, and snippets.

View marcus-at-localhost's full-sized avatar
💭

Marcus marcus-at-localhost

💭
View GitHub Profile
@marcus-at-localhost
marcus-at-localhost / zurb-ink-650.css
Last active August 29, 2015 14:27 — forked from rx/zurb-ink-650.css
Zurb Ink converted to 650px wide.
/**********************************************
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
**********************************************/
/* Client-specific Styles & Reset */
#outlook a {
padding: 0;
}
@marcus-at-localhost
marcus-at-localhost / gist:762f30849a579c4ae74b
Created January 21, 2016 22:47 — forked from betweenbrain/gist:2284129
Git command to export only changed files between two commits
git archive --output=file.zip HEAD $(git diff --name-only SHA1 SHA2)
@marcus-at-localhost
marcus-at-localhost / baseTagRelativeLinkFixer.js
Created November 14, 2016 22:39 — forked from EdwardCoyle/baseTagRelativeLinkFixer.js
Fixes references to inline SVG elements when the <base> tag is in use.
/**
* SVG Fixer
*
* Fixes references to inline SVG elements when the <base> tag is in use.
* Firefox won't display SVG icons referenced with
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page.
*
* More info:
* - http://stackoverflow.com/a/18265336/796152
* - http://www.w3.org/TR/SVG/linking.html
@marcus-at-localhost
marcus-at-localhost / info.md
Last active December 26, 2016 11:57 — forked from eltonmesquita/onViewport.js
A simple jQuery function that adds a class when the target(s) is in the viewport

Use like this:

// Call the function with the following parameters:
onViewport(selector, classNameToBeAdded, offset, callback);

// Example:
onViewport(".about-section", "active", 300, function() {
  console.log("This is not a drill.")
});
@marcus-at-localhost
marcus-at-localhost / trim.awk
Created January 10, 2017 16:36 — forked from andrewrcollins/trim.awk
ltrim(), rtrim(), and trim() in awk
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
BEGIN {
# whatever
}
{
# whatever
}
END {
@marcus-at-localhost
marcus-at-localhost / disposable-email-provider-domains
Last active January 13, 2017 22:40
List of disposable email provider domains
0815.ru
0clickemail.com
0-mail.com
0wnd.net
0wnd.org
0x00.name
10mail.org
10minut.com.pl
10minutemail.co.za
10minutemail.com
<?php
require_once 'Zend/Feed/Writer/Feed.php';
/**
* Create the parent feed
*/
$feed = new Zend_Feed_Writer_Feed;
$feed->setTitle('Paddy\'s Podcast');
@marcus-at-localhost
marcus-at-localhost / genColorCodeFromText.php
Created May 2, 2017 14:24 — forked from mrkmg/genColorCodeFromText.php
Generate a unique color based on text input
<?php
/*
* Outputs a color (#000000) based Text input
*
* @param $text String of text
* @param $min_brightness Integer between 0 and 100
* @param $spec Integer between 2-10, determines how unique each color will be
*/
function genColorCodeFromText($text,$min_brightness=100,$spec=10)
@marcus-at-localhost
marcus-at-localhost / Find a center point of multiple lat lng on Google Maps.php
Created May 17, 2017 05:49
Find a center point of multiple lat lng on Google Maps
<?php
// Find a center point of multiple lat lng on Google Maps
// $data = [
// 0 => [-8.412942,115.238952],
// 1 => [-8.800293,115.160986]
// ];
function GetCenterFromDegrees($data)
{
if (!is_array($data)) return FALSE;
@marcus-at-localhost
marcus-at-localhost / batchparams.bat
Last active July 25, 2017 11:01 — forked from zed/batchparams.bat
Paths in batch files
@echo off
:: http://weblogs.asp.net/jgalloway/archive/2006/11/20/top-10-dos-batch-tips-yes-dos-batch.aspx
echo %%~1 = %~1
echo %%~f1 = %~f1
echo %%~d1 = %~d1
echo %%~p1 = %~p1
echo %%~n1 = %~n1
echo %%~x1 = %~x1
echo %%~s1 = %~s1
echo %%~a1 = %~a1