Skip to content

Instantly share code, notes, and snippets.

## Golden config for golangci-lint v1.47.3
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adopt and change it for your needs.
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 3m
package main
import (
"bytes"
"encoding/binary"
"fmt"
"os"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
package main
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"net/http"
)
@dopey
dopey / cliplist.py
Last active February 18, 2019 23:18
from pynput import keyboard
import pyperclip
kb = keyboard.Controller()
cliplist = [
"list",
"of",
"strings",
"successively",
#!/bin/bash
animtoconvert=$1
# Split in frames
convert $animtoconvert -coalesce +adjoin temp_%04d.gif
# remove frames
rm temp_0000.gif # etc.
# Create the new animation & clean up everything
@dopey
dopey / README-Template.md
Created August 6, 2018 18:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@dopey
dopey / submodules.md
Created January 25, 2018 02:32 — forked from manasthakur/submodules.md
Using git submodules to version-control Vim plugins

Using git-submodules to version-control Vim plugins

If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need. Thus, you should keep the .vim directory along with your .vimrc version-controlled.

But when you have plugins installed inside .vim/bundle (if you use pathogen), or inside .vim/pack (if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
@dopey
dopey / main.go
Last active April 30, 2024 15:59 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@dopey
dopey / haproxy-deb.sh
Created February 10, 2016 01:34 — forked from nbrownus/haproxy-deb.sh
Builds a super basic haproxy deb, no extra crap
#!/bin/sh
VERSION="1.5.8"
BUILD="betable1"
set -e -x
DIRNAME="$(cd "$(dirname "$0")" && pwd)"
OLDESTPWD="$PWD"
#!/bin/sh
VERSION="8u72"
BUILD="betable1"
set -e -x
# Keep track of the original working directory.
OLDESTPWD="$PWD"