Skip to content

Instantly share code, notes, and snippets.

View .gitconfig
[diff]
tool = vscode
[difftool]
prompt = false
[difftool "vscode"]
cmd = \"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"$LOCAL\" \"$REMOTE\" --diff --wait
trustExitCode = false
@42tg
42tg / cloudSettings
Created Nov 26, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2018-11-26T13:51:58.803Z","extensionVersion":"v3.2.2"}
@42tg
42tg / vigenere-cipher.js
Created Nov 26, 2018
Quick encrypt and decrypt methods für vigenere ciper
View vigenere-cipher.js
const Alphabet = `ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split("");
const isEqualWith = key => v => key === v;
const matchKeyWithText = (key, text) =>
text
.split("")
.map((_, i) => key[i % key.length])
.join("");
const decode = key => text => {
@42tg
42tg / config.json
Created Nov 23, 2018
Quokka config backup
View config.json
{
"pro": true,
"plugins": ["jsdom-quokka-plugin"],
"babel": {
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-proposal-function-bind",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
@42tg
42tg / decryptHerzByHand.js
Last active Nov 23, 2018
Herz Decrypt cipher
View decryptHerzByHand.js
import text from "./decryptext";
import chalk from "chalk";
const isAscii = x => {
if (x.match(/[a-zA-Z0-9]/)) return true;
return false;
};
//calculate Average character frequency
const frequency = {};
const strippedText = text.split("").filter(isAscii);
strippedText.map(x => {
@42tg
42tg / wallaby.js
Created Oct 16, 2018
Basic Jest config
View wallaby.js
module.exports = function (wallaby) {
return {
files: [
{ pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false },
'config/jest.setup.js',
'src/**/*.js',
'package.json',
'!**/*[sS]pec.js',
'!**/*[tT]est.js',
'!node_modules/**/*.*',
You can’t perform that action at this time.