Skip to content

Instantly share code, notes, and snippets.

View qoomon's full-sized avatar
🌳
Go for it.

Bengt Brodersen qoomon

🌳
Go for it.
View GitHub Profile
@qoomon
qoomon / hibp
Last active October 5, 2024 15:39
Have I been pwned! Script to check your password against https://haveibeenpwned.com/
#!/usr/bin/env sh
set -e
color_red=$'\e[1;31m'
color_green=$'\e[1;32m'
color_reset=$'\e[0m'
########################### Usage ##############################################
#
# password prompt 'hibp'
# or
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active October 31, 2024 20:41
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@psiborg
psiborg / readme.md
Last active September 27, 2024 08:46
Apple Magic Mouse and Windows 10 #windows
  1. Download the latest version of the "Boot Camp Support Software" (e.g., 5.1.5722) from https://support.apple.com/downloads/bootcamp
  2. Unzip the file (e.g., bootcamp5.1.5722.zip) to a new directory
  3. Run BootCamp\Drivers\Apple\AppleWirelessMouse64.exe
  4. Turn on Bluetooth and pair your Magic Mouse

Note: Apple wireless mouse devices have a built-in passcode of "0000" (four zeros).

@qoomon
qoomon / ExceptionUtils.java
Last active July 20, 2018 11:09
Java - Throw checked exceptions as a unchecked exceptions see https://github.com/qoomon/unchecked-exceptions-java
public class ExceptionUtils {
/**
* Throws {@code t} as a unchecked exception.
*/
@SuppressWarnings("unchecked")
public static <T extends Throwable> void throwUnchecked(Throwable t) throws T {
throw (T) t;
}
@qoomon
qoomon / .gitlab-ci.yml
Last active July 20, 2022 23:18
GitLab CI - build and push docker image to GitLab registry
stages:
- pack
### Pack ######################################################################
docker:
stage: pack
environment: production
image: docker:18
script:
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active October 31, 2024 17:11
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@nishantmodak
nishantmodak / nginx.conf.default
Last active September 9, 2024 14:30
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@dupuy
dupuy / README.rst
Last active October 21, 2024 22:20
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@hansode
hansode / gen-selfsigned-cert.sh
Created August 2, 2011 20:00
Generate Self-Signed Certificate
#!/bin/sh
#
# based on http://sourcery.blogspot.com/2007/09/script-for-openssl-certificate-signing.html
#
set -e
C=
ST=
L=
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh