Skip to the relevant sections if needed.
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
// Underscore utility | |
var _ = require("underscore"); | |
// Miso library | |
var Miso = require("miso.dataset"); | |
// Nano library | |
var nano = require("nano"); | |
/* | |
* The Couchdb importer is responsible for fetching data from a CouchDB | |
* database. |
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
// Underscore utility | |
var _ = require("underscore"); | |
// Miso library | |
var Miso = require("miso.dataset"); | |
Miso.Parsers.Couchdb = function(data, options) {}; | |
_.extend(Miso.Parsers.Couchdb.prototype, { | |
parse: function(rows) { | |
var columns, valueIsObject; |
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
# Generate private and public keys with password. | |
openssl req -x509 -days 100000 -newkey rsa:2048 -keyout privatekey.pem -out publickey.pem -subj "/" | |
# Generate private and public keys without password. (add -nodes to the command) | |
openssl req -x509 -nodes -days 100000 -newkey rsa:2048 -keyout privatekey.pem -out publickey.pem -subj "/" | |
# Encrypt seemingly endless amount of data. | |
openssl smime -encrypt -aes256 -in LargeFile.zip -binary -outform DEM -out LargeFile_encrypted.zip publickey.pem | |
# Decrypt |
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 base64url(source) { | |
// Encode in classical base64 | |
encodedSource = CryptoJS.enc.Base64.stringify(source); | |
// Remove padding equal characters | |
encodedSource = encodedSource.replace(/=+$/, ''); | |
// Replace characters according to base64url specifications | |
encodedSource = encodedSource.replace(/\+/g, '-'); | |
encodedSource = encodedSource.replace(/\//g, '_'); |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
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
#Insert this at the end of /etc.defaults/ddns_provider.conf | |
[Namecheap] | |
modulepath=/usr/syno/bin/ddns/namecheap.php | |
queryurl=https://dynamicdns.park-your-domain.com/update |
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 apiUrl = "https://pass.telekom.de/api/service/generic/v1/status" | |
let widget = await createWidget() | |
widget.backgroundColor = new Color("#777777") | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() |
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 | |
set -euo pipefail | |
# Definition of colors for terminal output | |
readonly RED_COLOR="\e[31m" | |
readonly GREEN_COLOR="\e[32m" | |
readonly YELLOW_COLOR="\e[33m" | |
readonly BLUE_COLOR="\e[34m" | |
readonly MAGENTA_COLOR="\e[35m" |
OlderNewer