Skip to content

Instantly share code, notes, and snippets.

@Raizan
Raizan / .eslintrc.js
Last active July 5, 2022 15:51
Favorite Eslint Rules for Mocha
/**
* For .ts, install:
* @typescript-eslint/eslint-plugin
* @typescript-eslint/parser"
*
* For .js, delete these props:
* parser, plugins, overrides
*/
module.exports = {
root: true,
@Raizan
Raizan / mochaRefactor.js
Last active September 8, 2021 21:32
Code fix
/**
* Transform Mocha test file
* from legacy local convention into
* test filtering ready file
*
* @param {string} testFileContent
* @returns transfomed code
*/
function transform(testFileContent) {
// use @babel/parser
@Raizan
Raizan / start-vpn.sh
Last active April 4, 2018 16:10 — forked from kordless/start-vpn.sh
VPN Server for Google Cloud
#!/bin/bash
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
SERVER_NAME=overtime-$NEW_UUID
gcloud compute instances create $SERVER_NAME \
--machine-type "f1-micro" \
--image-family ubuntu-1604-lts \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "20" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "$NEW_UUID" \