Skip to content

Instantly share code, notes, and snippets.

@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@shqear93
shqear93 / disable-apparmor
Last active April 7, 2024 11:30
Disable AppArmor completely without breaking snapd
#!/usr/bin/env bash
# It was a nightmare when! aftrer installing docker i couldn't expose any port
# so far because apparmor was preventing docker from controlling the network
# I spent days looking for the solution till I found this documentation <3 :
# https://wiki.debian.org/AppArmor/HowToUse
sudo mkdir -p /etc/default/grub.d
echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT apparmor=0"' \
| sudo tee /etc/default/grub.d/apparmor.cfg
sudo update-grub
@TimoWestland
TimoWestland / GitHub-Forking.md
Created October 12, 2018 14:30 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@shr00mie
shr00mie / letsencrypt_esxi.sh
Last active November 26, 2023 18:12
Let's Encrypt SSL for ESXi
#!/bin/bash
#
## -----------------------------=[ WARNING ]=-------------------------------- ##
#
# This script is now woefully out of date due to which accounts ESXi allows to
# ssh into the box as well as sticky folders/file flags.
# I've since ported the whole thing to python with a lot of bells and whistles
# and if i get around to making it public, i'll put a link here.
#
## -------------------------------=[ Info ]=--------------------------------- ##
@Hengjie
Hengjie / tutorial.md
Last active May 1, 2024 02:33
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

#!/bin/bash
# Time-stamp: <Tue 2021-08-31 14:26 svarrette>
################################################################################
# Pre-commit hook to avoid accidentally adding unencrypted files with
# [git-crypt](https://www.agwa.name/projects/git-crypt/)
# Fix to [Issue #45](https://github.com/AGWA/git-crypt/issues/45)
#
# Usage:
# $ cd /path/to/repository
# $ git-crypt init
@frntn
frntn / gist:f25726df962fc29c6dde
Last active November 1, 2023 15:18
azure-cli cheatsheet
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment
@Rolilink
Rolilink / Dockerfile
Last active August 29, 2015 14:14
loopback-git-base Dockerfile
# LoopBack App Base Image
# Installs StrongLoop and Git
FROM dockerfile/nodejs
#Installing Loopback
RUN npm install -g strongloop
# Installing Git
RUN mkdir /data/git-tmp
WORKDIR /data/git-tmp
@skvark
skvark / edison_flashing_wifi.md
Last active February 9, 2022 08:48
Flashing Intel Edison using only serial connection and wifi

Do this at your own risk. I take no responsibility for any damage caused to your board.

My Intel Edison was shipped to me with old and buggy version of the Yocto Linux image. I purchased only the console block via Sparkfun (which has only one USB port connected to UART2 (serial connection) of the Edison therefore it's not connected to the actual USB on Edison) so I could not update to a new build the normal way.

I assume you have successfully connected to the Edison via the serial connection and can use the linux console on Edison.

  1. Connect the Edison into a local WiFi network with configure_edison --wifi
  2. Check that you can access to the Edison via SSH or with browser
    • if you can't, vi /etc/systemd/system/basic.target.wants/network-gadget-init.service and change the ip addresses to i.e 192.168.99.15
  3. On Edison, cd /
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html