created_date: 02.07.2016
last_update_date: 02.07.2016
author: @yugoslavskiy
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
/* https://www.digitalocean.com/community/questions/copy-and-paste-into-console */ | |
var sendString = (function(rfb, force, sendDelay) { | |
sendDelay = sendDelay || 25; | |
var _q = []; | |
var _qStart = function() { | |
var chr = _q.shift(); | |
if (chr) { | |
rfb.sendKey(chr); | |
setTimeout(_qStart, sendDelay); | |
} |
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
@keyframes grayscale { | |
0% { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ | |
} | |
100% { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
-webkit-filter: grayscale(0%); | |
} |
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/bash | |
# Simple IP address update with DigitalOcean API | |
# https://gist.github.com/icetee/85739d374380d15ebfec271f41e8bfbe | |
# | |
# Run every 15 minutes? Use `crontab -e` and paste this | |
# */15 * * * * /home/pi/ip.sh >/dev/null 2>&1 | |
# ----------------------------------------------------------------------------- | |
# Variables | |
API="https://api.digitalocean.com/v2" |
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
Get-ChildItem . -recurse | % { | |
Write-Host $_.FullName | |
} |
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/bash | |
# | |
# This version uses September 2016 rpi jessie image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" | |
xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns:t="http://www.microsoft.com/temp"> | |
<xsl:output method="html" encoding="us-ascii"/> | |
<xsl:template match="/"> | |
<xsl:call-template name="Start"/> | |
</xsl:template> |
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
Set-PSReadlineOption -BellStyle None |
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
_.sortRecursive = function(array, propName, propChild) { | |
array.forEach(function(item) { | |
var keys = _.keys(item); | |
keys.forEach(function(key) { | |
if (_.isArray(item[key])) { | |
item[key] = _.sortRecursive(item[key], propName); | |
} else if (_.isObject(item[key])) { | |
if (item[key].hasOwnProperty(propChild)) { | |
item[key][propChild] = _.sortRecursive(item[key][propChild], propName, propChild); |
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
$(document).on('click', 'a[href^="#"], a[data-scroll^="#"]', function(e) { | |
var id = $(this).attr('href'); | |
if (/^#/.test(id)) { | |
var $id = $(id); | |
if ($id.length === 0) { | |
return; | |
} | |
} else { | |
id = "#" + id.split("#")[1]; |