Skip to content

Instantly share code, notes, and snippets.

@nitrocode
nitrocode / github-gpg-key-with-private-email.md
Last active September 26, 2024 13:19
Github "Verified" commits using GPG key with private email

Github "Verified" commits using GPG key with private email

It's nice to see a Verified message next to each commit for peace of mind.

Using GPG or S/MIME, you can sign tags and commits locally. These tags or commits are marked as verified on GitHub so other people can be confident that the changes come from a trusted source.

  1. Install latest gpg

    If using a mac use homebrew

[alias]
pr = "!f() { git fetch origin pull/$1/head:sethvargo/pr-$1 && git checkout sethvargo/pr-$1; }; f"
unreleased = "!f() { git fetch --tags && git diff $(git tag | tail -n 1); }; f"
up = "!f() { git fetch --all; git pull origin HEAD; for upstream in $(git remote); do git remote prune "${upstream}"; done }; f"
graph = "!f() { git log --oneline --abbrev-commit --graph --decorate; }; f"
undo = !git reset HEAD~1 --mixed
amend = !git commit --amend --no-edit
top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20
x = "!f() { gitx; }; f"
@marcelblijleven
marcelblijleven / git diff comma separated files.sh
Created December 9, 2019 09:23
Comma separated files with git diff
git --no-pager diff --name-only develop | tr '\n' ',' | sed 's/\(.*\),/\1 /'
@welshstew
welshstew / build-complete.txt
Last active August 27, 2022 04:37
Generating and using ssl client certificates for use in an nginx sidecar image
[user@localhost certs]$ oc get builds
NAME TYPE FROM STATUS STARTED DURATION
nodejs-mongo-persistent-1 Source Git@e59fe75 Complete About an hour ago 2m37s
simple-nginx-ssl-reverseproxy-1 Source Git@552932f Complete 16 minutes ago 47s
@Hammer2900
Hammer2900 / download_multiple.py
Created September 28, 2016 17:51 — forked from harrisont/download_multiple.py
Use asyncio and aiohttp to asynchronously download multiple files at once and handle the responses as they finish
import asyncio
from contextlib import closing
import aiohttp
async def download_file(session: aiohttp.ClientSession, url: str):
async with session.get(url) as response:
assert response.status == 200
# For large files use response.content.read(chunk_size) instead.

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@taksuyu
taksuyu / learning-lens.md
Last active October 30, 2017 23:46
A list of material that helped me learn the lens package.

Learning Lens

I tend to focus on core concepts quite a bit more than actual examples, so that the fundamental understanding of what the examples are trying to teach me is building on skills I already have just haven't figured out how to use yet.

tl;dr Your mileage may vary. I learn kind of counterintuitively for others.

Since this seemed to be popular, I decided to make a repository for content about haskell topics that you can find here new materials for lens will be put here

#!/usr/bin/env bash
#
set -e
pushd "$(mktemp -dt scalaz)"
cat >build.sbt <<EOM
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-core" % "7.1.1",
@BenWhitehead
BenWhitehead / logback.xml
Last active August 29, 2015 14:09
Logback configuration for rolling file appender
<configuration scan="true" scanPeriod="30 seconds">
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>app.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>app.log.%i.zip</fileNamePattern>
@darrencauthon
darrencauthon / controller_test.rb
Created November 17, 2014 15:39
Contact Us Form
describe ContactUsController do
let(:params) { {} }
let(:controller) do
c = ContactUsController
c.stubs(:params).returns params
c
end