Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
EntropyWorks / Dockerfile
Created January 15, 2024 03:47 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@EntropyWorks
EntropyWorks / README.md
Created October 19, 2023 20:23 — forked from joelthompson/README.md
Vault Auth

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Yazz Atlas modified the Licensed Material and retain an indication of any previous modifications; Licensed Material is licensed under this Public License,(CC-BY-SA-4.) open-source license.

Sponsor

@EntropyWorks
EntropyWorks / Makefile
Last active June 17, 2020 01:36
for Ingy
# Eample of adding a hash for your own safety before running downloaded stuff.
#
# make+_hash: a73c1a409cd3b709ff7d10b9f40a0b817de2bba0 -
#
# This makes two calls outside but you could make just one. Also depends on having a compatable grep and shasum installed.
include $(shell grep -m 1 "make+_hash" Makefile | cut -f2 -d: > .make+_hash && curl -s https://makeplus.net/make+ | shasum -qc .make+_hash && curl -s https://makeplus.net/make+ | bash)
50-50 = return $((RANDOM % 2))
@EntropyWorks
EntropyWorks / attributes.rb
Created April 20, 2019 04:43 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@EntropyWorks
EntropyWorks / ansible-macos-homebrew-packages.yml
Created March 22, 2019 00:41 — forked from mrlesmithjr/ansible-macos-homebrew-packages.yml
Install MacOS Homebrew Packages With Ansible
---
- name: Install MacOS Packages
hosts: localhost
become: false
vars:
brew_cask_packages:
- 'atom'
- 'docker'
- 'dropbox'
- 'firefox'
#!/usr/bin/env ANSIBLE_HOSTS="" ANSIBLE_CONNECTION=local ansible-playbook
# vim:ft=yaml
---
- name: Homebrew Restore from Thu Mar 21 12:37:16 PDT 2019
hosts: 127.0.0.1
connection: local
tasks:
- name: check for xcode
@EntropyWorks
EntropyWorks / aws-swap.sh
Last active May 21, 2018 23:28
AWS Credential Swap
#!/bin/bash
#
# Do you have multiple AWS profiles?
# Here is how I deal with them.
#
# Make sure you add "${HOME}/.bash_aws_profile" to your .bashrc or .bash_profile so
# all new terminal sessions are updated with your choice.
#
aws-swap_function() {
AWS_DEFAULT_PROFILE="null"
@EntropyWorks
EntropyWorks / update-pi.sh
Last active April 17, 2018 05:47
How not to brick some of my rasberry pi's when I upgrade.
#!/bin/bash
# https://blog.sleeplessbeastie.eu/2017/10/16/how-to-automatically-control-apt-cache/
#
sudo echo "Lets Go!"
echo -e 'APT::Periodic::BackupArchiveInterval "7";\nAPT::Periodic::BackupLevel "3";\nDir::Cache::Backup "backup/";' | sudo tee /etc/apt/apt.conf.d/99_periodic_backup
echo -e 'APT::Periodic::MaxAge "14";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
echo -e 'APT::Periodic::MaxSize "1024";\nAPT::Periodic::MinAge "2";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
echo -e 'APT::Periodic::AutocleanInterval "10";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
echo -e 'APT::Periodic::Verbose "1";' | sudo tee /etc/apt/apt.conf.d/10_periodic_verbose
echo -e 'APT::Periodic::Update-Package-Lists "1";' | sudo tee /etc/apt/apt.conf.d/99_update-package-lists
@EntropyWorks
EntropyWorks / keybase.md
Created April 16, 2018 02:46
keybase.md

Keybase proof

I hereby claim:

  • I am entropyworks on github.
  • I am entropyworks (https://keybase.io/entropyworks) on keybase.
  • I have a public key ASBEizwP9cMSt_Cng03KzF4GnkgiLVpfr4x48Vdb_RM0UAo

To claim this, I am signing this object: