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
<!--source: http://stackoverflow.com/a/3493919/918211--> | |
<plugin> | |
<artifactId>exec-maven-plugin</artifactId> | |
<groupId>org.codehaus.mojo</groupId> | |
<executions> | |
<execution><!-- Run our version calculation script --> | |
<id>Version Calculation</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>exec</goal> |
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 | |
const ✓ = true; | |
const ✕ = false; | |
function ≠($left, $right) { | |
return $left != $right; | |
} | |
function ≅($left, $right) { |
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
# script to (one-way) synchronize a NextCloud directory to a reMarkable device | |
# use it manually as ssh remarkable /home/root/bin/syncNC or via Cron or systemd | |
# | |
# configure https://nextcloud.domain.tld/remote.php/dav/files/username/ with your own NextCloud Dav URL | |
# add your username, password and path to /opt/etc/davfs2/secrets | |
# install mount.davfs via opkg install davfs2 | |
# make the required directories e.g ~/nextcloudSync2 /media/nextcloudselfhosted/ on the reMarkable | |
# user reMarkable2_sync/ on your NextCould or change its location here | |
# do a symlink between ~/xochitl-data/ and ~/.local/share/remarkable/xochitl/ |
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 | |
// PHP 5.6 | |
usort($array, function($a, $b) { | |
if ($a == $b) { | |
return 0; | |
} | |
return ($a < $b) ? -1 : 1; | |
}); |
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
+---------------------------------------------------------------+ | |
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * | | |
+---------------------------------------------------------------+ | |
\ | |
\ ^ /^ | |
\ / \ // \ | |
\ |\___/| / \// .\ | |
\ /V V \__ / // | \ \ *----* | |
/ / \/_/ // | \ \ \ | | |
@___@` \/_ // | \ \ \/\ \ |
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
vim.o.background = "light" | |
vim.o.termguicolors = true | |
if vim.g.colors_name then vim.cmd("hi clear") end | |
vim.cmd("syntax reset") | |
vim.g.colors_name = "Boring Tomorrow" | |
-- Default GUI Colours |
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
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
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() { | |
// NOTE: I have intentionally avoided the use of jQuery in | |
// the next two functions so as not to obscure any details. | |
// Updates the DOM in such a way that layout is constantly | |
// computed and thrown away. | |
var UpdateThrash = function(data) { | |
// Get all the labels | |
var spans = document.querySelectorAll('.item .lab'); |
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
/** | |
* Encodes multi-byte Unicode string into utf-8 multiple single-byte characters | |
* (BMP / basic multilingual plane only). | |
* | |
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars. | |
* | |
* Can be achieved in JavaScript by unescape(encodeURIComponent(str)), | |
* but this approach may be useful in other languages. | |
* | |
* @param {string} unicodeString - Unicode string to be encoded as UTF-8. |
OlderNewer