This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
email = STDIN.read | |
url_email = email.gsub(/./) { |c| '%' + c.unpack('H2' * c.size).join('%').upcase } | |
html_email = url_email[1..-1].split(/%/).collect { |c| sprintf("&#%03d;", c.to_i(16)) }.join | |
print "<a href=\"mailto:#{url_email}\">#{html_email}</a>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!) | |
* but the usual tools were hitting the memory limit pretty quick. I found that | |
* manually parsing the XML worked pretty well. Note that this, most likely, | |
* won't work if cells contain anything more than text or a number (so formulas, | |
* graphs, etc ..., I don't know what'd happen). | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An helper file for Laravel 4, to provide autocomplete information to your IDE | |
* Generated with https://github.com/barryvdh/laravel-ide-helper | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
*/ | |
exit('Only to be used as an helper for your IDE'); | |
class App extends Illuminate\Support\Facades\App{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.clearfix:after { | |
content: ""; | |
display: block; | |
clear: both; | |
visibility: hidden; | |
font-size: 0; | |
height: 0; | |
} | |
.clearfix { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-webkit-scrollbar { | |
-webkit-appearance: none; | |
width: 7px; | |
} | |
::-webkit-scrollbar-thumb { | |
border-radius: 4px; | |
background-color: rgba(0,0,0,.5); | |
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* apply a natural box layout model to all elements */ | |
*, *:before, *:after { | |
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.partial = function() { | |
var fn = this, args = Array.prototype.slice.call(arguments); | |
return function() { | |
var arg = 0; | |
for (var i = 0; i < args.length && arg < arguments.length; i++) { | |
if (args[i] == undefined) { | |
args[i] = arguments[arg++]; | |
} | |
} | |
return fn.apply(this, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('rmHold', ['$timeout', function($timeout) { | |
return { | |
restrict: 'A', | |
link: function(scope, elem, attrs) { | |
var isActive = false; | |
var currentTimeout = null; | |
var startCoords = { | |
x: null, | |
y: null | |
} |
OlderNewer