This file contains hidden or 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
cat <file_name> | gpg -ac -o- | curl -X PUT -T "-" https://transfer.sh/<file_name>.gpg | |
curl https://transfer.sh/<hash>/<file_name>.gpg | gpg -o- > <file_name> |
This file contains hidden or 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
fetch('https://api.github.com/repos/:user/:repo/commits') | |
.then(x => x.json()) | |
.then(json => json.map(x => ({ author: x.commit.author.name, date: x.commit.author.date }))) | |
.then(console.log) |
This file contains hidden or 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
Array.from(document.querySelectorAll('.section-device')).map(x => { | |
var def = x.querySelector('.device').classList.item(1); | |
var colors = Array.from(x.querySelectorAll('.dot.tooltip')) | |
if (colors.length === 0) { | |
return [{ | |
className: def, | |
color: null | |
}] | |
} | |
return colors.map(c => { |
This file contains hidden or 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
collections: | |
- label: Settings | |
name: settings | |
files: | |
- label: CMS | |
name: cms | |
file: static/admin/config.yml | |
fields: | |
- label: Site URL | |
name: site_url |
This file contains hidden or 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
var username = 'LesterGallagher'; | |
var repo = 'ikverstaat'; | |
var date = '12/12/2010'; | |
var per_page = 100; | |
var page = 1; | |
var locale = 'nl-NL'; | |
var link = `https://api.github.com/repos/${username}/${repo}/commits?since=${new Date(date)}&per_page=${per_page}&page=${page}`; | |
var getLog = async () => { | |
var commits = []; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<!-- Latest compiled and minified CSS --> |
This file contains hidden or 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"; | |
if (window.cordova && cordova.platformId !== "browser") { | |
document.addEventListener("deviceready", function () { | |
document.addEventListener("click", function (e) { | |
var elem = e.target; | |
while (elem != document) { | |
if (elem.tagName === "A" && elem.hasAttribute("download")) { | |
e.preventDefault(); |
This file contains hidden or 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 IndexedDBStorage(name) { | |
this.name = name; | |
var self = this; | |
this.ready = new Promise(function(resolve, reject) { | |
var request = (window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB) | |
.open(location.origin); | |
request.onupgradeneeded = function(e) { | |
self.db = e.target.result; | |
self.db.createObjectStore(name); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Game</title> | |
<style> |
This file contains hidden or 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 NLP = require('natural'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const fs = require('fs'); | |
const { stemmer } = require('./config'); | |
const trainingDataPath = process.argv[2]; | |
const classifierName = process.argv[3]; | |
if (!trainingDataPath || !classifierName) { | |
console.log('usage: node . <path/to/trainingdata.json> <classifier_name>'); |