Skip to content

Instantly share code, notes, and snippets.

View attawayinc's full-sized avatar
💭
I may be slow to respond.

attawayinc

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
#save as install-k3d.sh
#az vm create -g k3s --image UbuntuLTS --admin-username ubuntu --ssh-key-values ~/.ssh/id_rsa.pub -n k3s --custom-data install-k3d.sh
#az network nsg rule create -g k3x --nsg-name k3xNSG --priority 1002 --access Allow --protocol Tcp --destination-port-ranges 443 -n https
#az network nsg rule create -g k3x --nsg-name k3xNSG --priority 1001 --access Allow --protocol Tcp --destination-port-ranges 80 -n http
curl https://get.docker.com/ | sh
sudo usermod -aG docker ubuntu
@samuelherrera22
samuelherrera22 / cloudSettings
Last active April 11, 2021 18:21
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-11T18:21:14.223Z","extensionVersion":"v3.4.3"}
@robwierzbowski
robwierzbowski / switch_to_npm_registry.sh
Last active September 28, 2024 20:24
Configure yarn to use the npm registry directly
#!/bin/bash
# Remove all settings in the .npmrc except the required auth token setting.
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
# Create a new .yarnrc that specifies the npm registry, or append to an existing one.
echo 'registry: https://registry.npmjs.org/' >> .yarnrc
# Remove and regenerate the yarn.lock. This should be identical to running `yarn upgrade`.
# If you are uncomfortable regenerating the yarn.lock file, you can comment out the next
@desolat
desolat / git_move_files.sh
Last active February 5, 2021 05:42 — forked from trongthanh/gist:2779392
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# see also: https://medium.com/@ayushya/move-directory-from-one-repository-to-another-preserving-git-history-d210fa049d4b
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# For safety remove the origin ref:
git remote rm origin
# Remove unneeded branches, ... (will slim the .git folder)

Guix on WSL2

(updated versions of this document, plus more, live here)

This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.

Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 9, 2025 09:37
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
---
###############################################################################
#
# GLOBAL Config: ansible/inventory/group_vars/all/pki.yml
#
###############################################################################
# Enable staging env during development
#pki_acme_ca: 'le-staging-v2'
@CalvinHartwell
CalvinHartwell / 18.04-openscap.md
Last active December 18, 2024 10:55
Using OpenSCAP on Ubuntu 18.04 LTS

Using OpenSCAP on Ubuntu 18.04 LTS

Installation Instructions

First we install the following packages to use the openscap command-line tool: sudo apt-get install libopenscap8 python-openscap

We will also install the SCAP security guide: sudo apt install ssg-base ssg-debderived ssg-debian ssg-nondebian ssg-applications

@tsuz
tsuz / Dockerfile
Last active February 14, 2021 12:17
Example of adding local timezone into Docker (example for Asia/Tokyo) - Dockerに日本時間を導入する方法
############################
# STEP 1 build executable binary
############################
FROM golang:1.11-alpine as builder
ARG SSH_PRIVATE_KEY
RUN apk update \
&& apk add openssh \
&& apk add git mercurial \