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
/* | |
A full list of simple easing equations inspired by GIST from greweb - https://gist.github.com/gre/1650294 | |
Equations source - http://gsgd.co.uk/sandbox/jquery/easing/ | |
*/ | |
{ | |
linear: function(t) { | |
return t | |
}, | |
inQuad: function(t) { |
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
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2015 Fedia <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 bash | |
cd "$PWD" | |
shopt -s globstar | |
for f in *.otf *.ttf ; do | |
FILE=$(basename "$f") | |
if [ "$FILE" != "." ] && [ "$FILE" != ".." ] && [ "$FILE" != "*.otf" ] && [ "$FILE" != "*.ttf" ] | |
then | |
echo "Converting $FILE" |
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
<style> | |
html:not(.is-phone) .whatsapp-link { | |
display: none; | |
} | |
</style> | |
<a class="whatsapp-link" href="whatsapp://send?text=url-encoded-text-goes-here"> | |
Share with Whatsapp | |
</a> | |
<script> | |
;(function(navigator, document) { |
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
'use strict'; | |
const http = require('http'); | |
const https = require('https'); | |
const {URL} = require('url'); | |
const methods = {}; | |
['get', 'post', 'put', 'patch', 'delete', 'head', 'options'].forEach(method => { | |
methods[method] = (url, data, headers) => { | |
return request(url, method, data, headers); |
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
const http = require('http'); | |
const port = process.env.PORT || 1234; | |
const server = http.createServer((request, response) => { | |
response.end(`It works!! Url: ${request.url}`); | |
}).listen(port, () => { | |
console.log(`Server listening on http://localhost:${port}`); | |
}); |
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 | |
$file = file_get_contents("/etc/hosts"); | |
$lines = explode("\n", $file); | |
$hosts = array(); | |
foreach($lines as $line) { | |
if (preg_match("/^#/", $line) || !$line) { | |
continue; | |
} |
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
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
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
window._debug = true; | |
// ... | |
var logTable = function(data, prefix){ | |
var table = [], | |
i, | |
value, | |
isArray; |
NewerOlder