Skip to content

Instantly share code, notes, and snippets.

@42tg
42tg / wallaby.js
Created October 16, 2018 14:03
Basic Jest config
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/**/*.*',
@42tg
42tg / decryptHerzByHand.js
Last active November 23, 2018 12:40
Herz Decrypt cipher
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 / config.json
Created November 23, 2018 12:42
Quokka config backup
{
"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 / vigenere-cipher.js
Created November 26, 2018 13:51
Quick encrypt and decrypt methods für vigenere ciper
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 / cloudSettings
Created November 26, 2018 13:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-11-26T13:51:58.803Z","extensionVersion":"v3.2.2"}
[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 / resume.json
Last active December 19, 2022 11:43
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Tobias Graf",
"label": "Software Developer",
"image": "",
"email": "tobiasgraf87@gmail.com",
"phone": "0174 4847548",
"summary": "I am a software developer from Hannover, Germany who is highly interested in current web development trends. As someone who is constantly seeking to improve my skills and knowledge, I am always exploring new technologies and techniques that can help me to create innovative software solutions.",
"location": {