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
javascript: ( | |
function () { | |
/* Inspired by https://codepen.io/hoanghals/pen/dZrWLZ */ | |
/* Uses: https://github.com/buzzfeed/libgif-js */ | |
console.log('Start'); | |
const PAUSED_CLASS = 'paused'; | |
const GIF_CONTROL_CLASS = `gif-control`; | |
const run = () => { | |
console.log('Run'); |
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
/** | |
* This file shows how to delete a folder from a GitHub repository using the REST v3 API | |
* Because it is not trivial... | |
* It was last tested to work on 2020/12/11 | |
* | |
* The script is supposed to be called like this: node commit.js quilicicf Depotware myBranch | |
* Where the arguments are in order: the owner of the repository, the name of the repository and | |
* the name of the branch where the commit will be done. | |
* | |
* It assumes there is a valid GitHub personal access token available as environment variable: GITHUB_TOKEN |
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
/** | |
* This file shows how to commit a set of files to a GitHub repository using the REST v3 API | |
* Because it is not trivial... | |
* It was last tested to work on 2020/12/10 | |
* | |
* The script is supposed to be called like this: node commit.js quilicicf Depotware myBranch | |
* Where the arguments are in order: the owner of the repository, the name of the repository and | |
* the name of the branch where the commit will be done. | |
* | |
* It assumes there is a valid GitHub personal access token available as environment variable: GITHUB_TOKEN |
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 crypto = require('crypto'); | |
const ALGORITHM = 'aes256'; | |
const DECRYPTED_ENCODING = 'utf8'; | |
const ENCRYPTED_ENCODING = 'hex'; | |
// Makes sure to have a secret with the right size by hashing it and taking a substring of the hash. | |
// I'm not sure whether this is cryptographically secure, don't use in production. | |
const hashSecret = secret => crypto | |
.createHash('sha256') |