Skip to content

Instantly share code, notes, and snippets.

@klingtnet
klingtnet / how-to-upgrade-nvmw-ssd-firmware-on-linux.md
Last active October 11, 2024 08:20
How to upgrade [Lenovo] NVMe SSD firmware on Linux

The instructions were tested on a Lenovo X1 Carbon 5th Gen (X1C5) on Arch Linux but should be applicable to other Lenovo models and Linux distributions.

BACKUP YOUR DATA! I created a bootable Ubuntu Image like this:

$ sudo sh -c 'curl --location --silent --fail "http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso" | pv > /dev/<your-usb-drive>'
# note that pv is only there to show progress, it is perfectly fine to redirect curl to the usb drive directly.

then I booted from this drive by pressing F12 on reboot and dumped my NVMe disk to an external hard drive like this:

@aheadley
aheadley / start-telegraf.sh
Created September 21, 2017 17:46
Telegraf on FreeNAS
#!/bin/bash
# full path to the telegraf executable in the jail it was installed in
TELEGRAF_BIN='/mnt/tank0/jails/telegraf-test/usr/local/bin/telegraf'
# dir for storing the pid, config, and log files
BASE_DIR='/mnt/tank0/home/aheadley'
if [ -f $BASE_DIR/telegraf.pid ] && kill -0 $(cat $BASE_DIR/telegraf.pid) &>/dev/null; then
# don't start it again if it's already running
echo "Telegraf running ($(cat $BASE_DIR/telegraf.pid))..."
@TheDonDope
TheDonDope / escape.from.tarkov.keybindings.md
Last active January 20, 2023 19:00
Escape from Tarkov Keybindings

Escape from Tarkov Controls Cheat Sheet

BEGINNER'S GUIDE - ALL CONTROLS + TIPS (Escape from Tarkov)

Controls

  • Hold Shift when zoomed in with Mouse Right Click to hold breath and steady aim
  • Press B to switch between firing modes 🔥 (You will always start a raid in single fire mode)
    • The animation when switching to 🔥 🔥 🔥 fire is an ⬆️ flick
  • The animation when switching to 🔥 fire is an ⬇️ flick
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active September 27, 2024 16:46
LVM on LUKS Arch installation with systemd-boot
@heppu
heppu / ARCH_INSTALL.MD
Last active August 22, 2024 16:25
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@magnetikonline
magnetikonline / README.md
Last active April 29, 2024 23:45
PowerShell execute command (.exe) with arguments safely (e.g. with spaces).

PowerShell execute command with arguments safely

In my opinion this is the best way for executing external commands from PowerShell with arguments in a safe manner - via the use of an array to hold the arguments.

Consider this one a PowerShell gem to keep in the toolbox.

Note

The example below makes use of EchoArgs.exe - a small utility that simply echoes back arguments passed to it. Utility is part of the PowerShell Community Extensions, or the exe alone can be downloaded at https://ss64.com/ps/EchoArgs.exe.

Example

@leonardofed
leonardofed / README.md
Last active November 3, 2024 16:15
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@MikeRatcliffe
MikeRatcliffe / FreeNAS.md
Last active December 2, 2021 23:26 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup
@rastaman
rastaman / start-mesos-slave-c1.sh
Last active December 10, 2015 10:58
A script to install mesos and start mesos-slave on a ARM C1 node from cloud.online.net . Packaged and tested on the Docker instant app.
apt-get install -y libsvn-dev wget
wget http://www.effervens.com/experimental/mesos/mesos_0.22.0_armhf.deb
dpkg -i ./mesos_0.22.0_armhf.deb
echo /opt/mesos/lib > /etc/ld.so.conf.d/mesos.conf
ldconfig
export MESOS_master=zk://ZK1:2181,ZK2:2181,ZK3:2181/mesos
# Other options you're likely to want to set:
export MESOS_log_dir=/var/log/mesos
export MESOS_work_dir=/var/run/mesos
export MESOS_isolation=cgroups