Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# path: /home/klassiker/.local/share/repos/dmenu/scripts/dmenu_iwd.sh
# author: klassiker [mrdotx]
# github: https://github.com/mrdotx/dmenu
# date: 2020-06-08T09:11:53+0200
script=$(basename "$0")
help="$script [-h/--help] -- script to connect to wlan with iwd
Usage:
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active July 9, 2024 11:26
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@mgoellnitz
mgoellnitz / clean-old-gitlab-pipelines.sh
Last active November 11, 2022 16:30
Clean old GitLab CI build job's results
#!/bin/bash
#
# Copyright 2017-2021 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@alopresto
alopresto / gpg_git_signing.md
Last active January 18, 2024 22:42
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@theothermattm
theothermattm / sync-using-gitignore.sh
Created October 7, 2015 20:58
Rsync files using .gitignore
# sync everything excluding things in .gitignore
# delete anything on target not in source
# include dotfiles and symlinks, also use compression
rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory
@jongillies
jongillies / ldap.py
Created September 29, 2015 21:40
Default /etc/tower/conf.d/ldap.py
###############################################################################
# LDAP AUTHENTICATION SETTINGS
###############################################################################
# Ansible Tower can be configured to centrally use LDAP as a source for
# authentication information. When so configured, a user who logs in with
# a LDAP username and password will automatically get an account created for
# them, and they can be automatically placed into multiple organizations as
# either regular users or organization administrators. If users are created
# via an LDAP login, by default they cannot change their username, firstname,
@philipz
philipz / ceph.md
Created August 27, 2015 08:45
Docker Volume Driver Plugin for Ceph RBD
@lpereira
lpereira / adblock.py
Last active November 29, 2017 00:08
Block ads and other annoyances by redirecting their host names to 127.0.0.1
#!/usr/bin/python
import requests
sources = [
'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext',
'http://hosts-file.net/.%5Cad_servers.txt',
'https://adaway.org/hosts.txt',
'http://winhelp2002.mvps.org/hosts.txt',
'http://sysctl.org/cameleon/hosts',
@mattes
mattes / update.sh
Last active August 29, 2015 14:03
Update Docker and Boot2docker-CLI
# curl https://gist.githubusercontent.com/mattes/a83b887e0e79a461ce95/raw/update.sh | bash
boot2docker version
docker version
# update docker
(
cd /tmp
wget http://get.docker.io/builds/Darwin/x86_64/docker-latest.tgz
tar -xvf docker-latest.tgz