Skip to content

Instantly share code, notes, and snippets.

@shmerl
shmerl / gog_extract_konami_collectors_series.sh
Last active January 22, 2024 06:35
For extracting GOG Konami Collector's Series
#!/bin/bash
# Extractor for game ROMs from Konami Collector's Series.
#
# Usage: gog_extract_konami_collectors_series.sh <path_to>/cc.exe
#
# Make sure you have xxd hexdump tool and dd installed.
#
# Games locations:
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 14, 2022 23:21
What's the longest keyword sequence in Javascript?
@saschwarz
saschwarz / commands.js
Last active August 31, 2022 07:16
Automated Azure AD login and session token capture to json file for reading by Cypress commands. Heavily inspired by https://gist.github.com/pieterdv/82773fbe036719479d76ab0a4985dc3b
const API = Cypress.env('API');
const headers = {
Authorization: '',
};
Cypress.Commands.add('loginUser', () => {
return cy.readFile('aad-tokens.json')
.then(creds => {
// set auth headers so test setup calls are authorized
@KevinAst
KevinAst / article.md
Last active March 5, 2023 13:24
Integrating GitBook with JSDoc to Document Your Open Source Project

Integrating GitBook with JSDoc to Document Your Open Source Project

Introduction

Good documentation should include two distinct elements - a Guide and an API:

  1. The Guide builds concepts, providing examples, etc.

GitBook is well suited to

@aslakhellesoy
aslakhellesoy / bumbailiff
Last active February 19, 2021 10:03
You can have a little tech debt for a short time. After that the bumbailiff will be up your bum.
#!/usr/bin/env bash
#
# The bumbailiff allows the team to take up a small amount of technical debt
# (TODOs in the code) for a limited period. After that period the script fails.
#
# Originally written by Aslak Hellesoy
#
set -ef -o pipefail
IFS=$'\n' # make newlines the only separator
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@forabi
forabi / Webpack 2.0.7-beta vs Rollup
Last active January 28, 2020 08:54
Webpack 2 vs Rollup
❯ rollup --version
rollup version 0.25.3
❯ time rollup -c ./rollup.js
rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total
❯ time webpack
Hash: ebb00bbccd954c114d3c
Version: webpack 2.0.7-beta
Time: 3623ms
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active June 1, 2024 09:44
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@lukehoban
lukehoban / asyncloops.js
Last active May 31, 2021 23:18
Async/await and parallel loops
// ES6 w/ Promises
// Note: From a React starter template - see https://t.co/wkStq8y3I5
function fetchData(routes, params) {
let data = {};
return Promise.all(routes
.filter(route => route.handler.fetchData)
.map(route => {
return route.handler.fetchData(params).then(resp => {
data[route.name] = resp;
@jr314159
jr314159 / karma.coffee.erb
Created January 15, 2014 16:35
Karma rake task
# Karma configuration
# Generated on Tue Aug 20 2013 16:26:25 GMT-0400 (EDT)
module.exports = (config) ->
config.set
# base path, that will be used to resolve all patterns, eg. files, exclude
basePath: '..'
# frameworks to use