Skip to content

Instantly share code, notes, and snippets.

@natecrisler
natecrisler / README
Created October 19, 2022 06:42 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Let's get started
#
# Let's install nix (at the time of writing this is version 2.5.1
curl -L https://nixos.org/nix/install | sh
# I might not have needed to, but I rebooted
@natecrisler
natecrisler / 1password-vpn-login.sh
Created August 1, 2022 20:32 — forked from charles-rumley/1password-vpn-login.sh
Use stored 1Password credentials to authenticate a Cisco AnyConnect VPN client
#!/usr/bin/env bash
# Prerequisites
#
# Download the 1Password CLI tool
#
# brew cask install 1password-cli
#
# Before using this script, you'll need to authenticate the 1Password
# CLI for the first time. Use the following command, replacing
@natecrisler
natecrisler / my-radio.sh
Created June 12, 2022 15:00 — forked from sergev/my-radio.sh
Listen radio from command line (Linux or Mac OS X)
#!/bin/bash
#
# Start radio broadcast from one of listed stations.
# Copyright (C) 2017-2018 Serge Vakulenko
#
declare -a list=(
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
"BBC Radio One"
http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws
@natecrisler
natecrisler / Edit_Repack_ISO_tutorial.md
Created June 10, 2022 20:10 — forked from AkdM/Edit_Repack_ISO_tutorial.md
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@natecrisler
natecrisler / backup.sh
Created September 14, 2021 20:34 — forked from nicerobot/backup.sh
Clone or update a user's gists locally
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

@natecrisler
natecrisler / cisco-anyconnect-auto-login.md
Created August 3, 2021 19:59 — forked from zenglian/cisco-anyconnect-auto-login.md
auto login with cisco anyconnect (password saved, silent mode)

Cisco AnyConnect: auto login in silent mode

This gist is for Linux. For windows is the same thing.

Connect

create a file .login_info as below:

connect your.server.url    
usernanme 
Docker + Traefik + Let's Encrypt + Github Repository
Using:
- Ubuntu 19.04
- Docker Engine 19.03
- Docker Compose 1.25.0-rc2
- Traefik v1.7.18 with dnsChallenge
- Traefik v2.0.1 with httpChallenge
--
- Github Registry
@natecrisler
natecrisler / ansible-role-test.sh
Created August 19, 2019 19:58 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)