Skip to content

Instantly share code, notes, and snippets.

@markbates
markbates / github-workflows-goreleaser.yml
Last active March 7, 2020 09:00
Run Go tests in Windows, Mac, Linux. Go version 1.12/1.13 both with Modules and GOPATH.
name: Release
on:
release:
types:
- published
jobs:
release:
name: Release
runs-on: ubuntu-latest
// try-catch style
//
// Advantages:
// 1. Familiar to OOP developers
// 2. Explicit error-handling code not required
// 3. Works well with async-await syntax
//
// Disadvantages:
// 1. Inefficient
// 2. Explicit error-handling code not required
@BretFisher
BretFisher / docker-for-mac.md
Last active May 23, 2024 22:25
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@stuartstevenson
stuartstevenson / jenkins-job-dsl.groovy
Created September 16, 2014 07:50
Jenkins job dsl with distributed job config files. The seed.groovy file scans stash repo branches for jenkins-job-dsl.groovy files and runs them centrally.
Closure job = {
// Job Name
name "${stashProjectKey}-${projectName}-${branchSimpleName}"
// Where should jenkins run the job
label ('master')
// Where should Jenkins get the source code from
scm {
git {
@berzniz
berzniz / jshipster_and_and.js
Last active May 22, 2022 23:15
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 25, 2024 09:14
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: