Table of Contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.mutter dynamic-workspaces false | |
gsettings set org.gnome.desktop.wm.preferences num-workspaces 10 | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>1']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>2']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>3']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>4']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>5']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['<Super>6']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Super>7']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['<Super>8']" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .config/nixpkgs/overlays/default.nix | |
self: super: | |
let | |
callPackage = super.lib.callPackageWith super; | |
in | |
{ | |
packer = super.callPackage ./pkgs/packer {}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, pkgs, lib, ... }: | |
{ | |
# IPv6 is supported, but this example is for IPv4 | |
networking.wg-quick.interfaces = { | |
wg0 = { | |
address = [ "10.7.0.1/32" ]; | |
peers = [ | |
{ | |
publicKey = "ABCABCABC"; | |
allowedIPs = [ "0.0.0.0/0" ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.ansible.com/ansible/latest/modules/dconf_module.html | |
# | |
# To determine what dconf keys and values to use, you can run `dconf watch /` | |
# in a terminal as you make changes in settings or tweaks. You can also use | |
# `dconf read <key>` and `dconf write <key> <value>` to experiment with various | |
# settings. The dconf-editor application is also useful for exploring various | |
# keys along with their descriptions. | |
- hosts: localhost | |
tasks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import org.jenkinsci.plugins.plaincredentials.impl.* | |
// def item = Jenkins.instance.getItem("your-folder") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// Here's a simple example to show how to properly terminate multiple go routines by using a context. | |
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends. | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"os" | |
"strings" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Restores ip6tables configuration. | |
# Expected to reject everything BUT: | |
# - icmpv6 from anywhere | |
# - ssh (22/tcp) from a whitelisted ipv6 subnet | |
# - openvpn (1094/udp) from anywhere | |
# | |
# stigok, july 2017 |
NewerOlder