Skip to content

Instantly share code, notes, and snippets.

View NickCrew's full-sized avatar

Nick Ferguson NickCrew

View GitHub Profile
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-g",
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "clang++ build and debug active file",
"type": "cppdbg",
"request": "launch",
@NickCrew
NickCrew / CapLockAsCtrlEsc.ahk
Created November 25, 2019 14:36
AutoHotKey: Caps Lock as Ctrl+Escape
SetCapsLockState, AlwaysOff
*Capslock::Send,{control down}
*Capslock up::
if (A_PriorHotkey = "*Capslock")
{
send,{Control Up}{Escape}
Return
}
@NickCrew
NickCrew / keybindings.json
Created February 14, 2019 17:03
vscode keybindings (windows)
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "f6",
"command": "workbench.action.navigateEditorGroups"
},
{
"key": "ctrl+alt+f",
"command": "actions.find"
},
@NickCrew
NickCrew / check_mk_install.sh
Created December 1, 2018 16:28
Install Check_MK and LibreNMS
#!/bin/bash
set -e
git clone https://github.com/librenms/librenms-agent.git /opt/librenms-agent
cp /opt/librenms-agent/check_mk_agent /usr/bin/check_mk_agent
mkdir -p /usr/lib/check_mk_agent/plugins
mkdir -p /usr/lib/check_mk_agent/local
@NickCrew
NickCrew / .vimrc
Created December 1, 2018 16:27
Vim Virtualenv Support
" Add the virtualenv's site-packages to vim path
if has('python')
py << EOF
import os.path
import sys
import vim
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
sys.path.insert(0, project_base_dir)
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
@NickCrew
NickCrew / ks.cfg
Created December 1, 2018 16:26
(Fedora Atomic) Kickstart Snippet
ostreesetup --osname="fedora-atomic" --remote="fedora-atomic" --url="file:///ostree/repo" --ref="fedora/28/x86_64/atomic-host" --nogpg
%post --erroronfail
rm -f /etc/ostree/remotes.d/fedora-atomic.conf
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-primary fedora-atomic 'https://dl.fedoraproject.org/atomic/repo/'
cp /etc/skel/.bash* /root
@NickCrew
NickCrew / preseed.cfg
Created December 1, 2018 16:26
Ubuntu 16.04 Preseed
# Ubuntu 16.04 preseed config
# Larry Smith Jr.
# @mrlesmithjr
# http://everythingshouldbevirtual.com
### Localization
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
@NickCrew
NickCrew / ks.cfg
Created December 1, 2018 16:25
(Red Hat) Kickstart Snippet - Single Partition
part pv.008002 --size=1 --grow --ondisk=sda
volgroup VolGroup --pesize=4096 pv.008002
logvol swap --name=lv_swap --vgname=VolGroup --size=2016 --maxsize=2016
logvol / --name=lv_root --vgname=VolGroup --fstype=ext4 --grow --size=1
part /boot --fstype=ext4 --size=500
@NickCrew
NickCrew / ks.cfg
Created December 1, 2018 16:24
(Red Hat) Kickstart - Auto-partition
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
#cdrom
# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'