Skip to content

Instantly share code, notes, and snippets.

@alexedwards
alexedwards / Makefile
Last active May 18, 2024 13:56
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@twalker
twalker / mb-choose-a-board.md
Created January 29, 2022 05:11
mb-choose-a-board.md

Choose your ergonomic keyboard

I plan to build a custom ergonomic mechanical keyboard for you. We want it to fit you so well it becomes a joy to type.

Choose your board

Name # of keys** Number row Column stagger Notes
@muppetjones
muppetjones / README.md
Last active August 26, 2023 15:18
QMK Mouse Movement via Encoders

Etch-a-mouse

NOTE: This gist is deprecated. I've moved everything into /users/muppetjones, and I have an open PR on the QMK repo. Eventually, this will probably be merged, and I'll (hopefully) remember to update this note.

@viktors-telle
viktors-telle / azure-devops-pipeline.yaml
Created March 14, 2020 21:07
Example how call Azure DevOps yaml template from another repository.
pool: your-agent-pool-name
trigger:
batch: true
branches:
exclude:
- refs/heads/feature*
resources:
repositories:
@viktors-telle
viktors-telle / deployment-job-steps.yaml
Created March 14, 2020 20:44
Azure DevOps deployment job steps.
parameters:
container_name:
container_key:
variable_group_name:
environment:
tf_plan_name:
working_directory:
steps:
- checkout: self
@michaelkeevildown
michaelkeevildown / credit-card-regex.md
Last active April 17, 2024 20:36
Credit Card Regex Patterns

Credit Card Regex

  • Amex Card: ^3[47][0-9]{13}$
  • BCGlobal: ^(6541|6556)[0-9]{12}$
  • Carte Blanche Card: ^389[0-9]{11}$
  • Diners Club Card: ^3(?:0[0-5]|[68][0-9])[0-9]{11}$
  • Discover Card: ^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
  • Insta Payment Card: ^63[7-9][0-9]{13}$
  • JCB Card: ^(?:2131|1800|35\d{3})\d{11}$
  • KoreanLocalCard: ^9[0-9]{15}$
@bdchauvette
bdchauvette / .babelrc
Last active June 21, 2021 17:44
Minimal babel boilerplate
{
"presets": [ "es2015" ]
}
@gaearon
gaearon / index.js
Last active January 5, 2022 18:45
Breaking out of Redux paradigm to isolate apps
import React, { Component } from 'react'
import Subapp from './subapp/Root'
class BigApp extends Component {
render() {
return (
<div>
<Subapp />
<Subapp />
<Subapp />
@HenrikJoreteg
HenrikJoreteg / persist-to-ls-redux-middleware.js
Created January 8, 2016 23:24
Example redux middleware
import { STAR_PERSON, MET_PERSON, UPDATE_NOTES, SET_URL } from '../constants/action-types'
import { LS_KEY } from '../constants/localstorage-keys'
import tryit from 'tryit'
import debounce from 'lodash.debounce'
const userPreferenceActions = [STAR_PERSON, MET_PERSON, UPDATE_NOTES]
function writeToLocalStorage (getState) {
let data = {
starred: {},
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go