Skip to content

Instantly share code, notes, and snippets.

@coopbri
coopbri / raspi_unattended.md
Last active April 26, 2024 13:17
Automatically update packages on Raspberry Pi OS (most recent version checked: August 2020)
  1. Install unattended-upgrades package:

     # apt install unattended-upgrades
  2. Add Raspberry Pi Foundation sources to unattended-upgrades config:

     # /etc/apt/apt.conf.d/50unattended-upgrades
     
    

Unattended-Upgrade::Origins-Pattern {

@leocomelli
leocomelli / git.md
Last active April 26, 2024 13:14
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@emrekgn
emrekgn / isimler
Last active April 26, 2024 13:14
Türkçe İsim Listesi
JALE
ALİ
MAHMUT
MANSUR KÜRŞAD
GAMZE
MİRAÇ
YÜCEL
KUBİLAY
HAYATİ
BEDRİYE MÜGE
@Sh4yy
Sh4yy / clx.go
Created April 25, 2024 20:39
Generate CLI commands for common tasks.
package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"runtime"
@Dlfaith
Dlfaith / gist:0d43be3dfb296bb6260af75ef082faa8
Created December 6, 2022 02:51
Free Windows Server 2022 Product Key
Free Windows Server 2022 Standard Product Key
HP9DJ-NK2X6-4QPCH-8HY8H-6X2XY
RRNMT-FP29D-CHKCH-GWQP2-DDDVB
44QN4-X3R72-9X3VK-3DWD6-HFWDM
Free Windows Server 2022 Datacenter Product Key
WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Download windows Sever 2022 Evaluation edition:
Windows Server 2022 Evaluation English
@Paraphraser
Paraphraser / Mount Raspberry Pi home directory on your Mac.md
Last active April 26, 2024 13:10
Using SSHFS to mount your Raspberry Pi's home directory on your Mac

Using SSHFS to mount your Raspberry Pi's home directory on your Mac

It is useful to be able to mount your Raspberry Pi's file system on your Mac's desktop. The Raspberry Pi is ready to rock-'n-roll but some work needs to be done on the Mac. This gist assumes macOS Mojave 10.14. Your mileage may vary on earlier or later versions.

Set up passwordless SSH (optional)

You can make your life quite a bit simpler if you set up SSH on your Mac so that it can login to your Raspberry Pi without needing a password. Follow this tutorial.

The tutorial assumes two Raspberry Pis but there is no difference in approach if you use a Mac and a Pi, or two Macs.

@dhh
dhh / linux-setup.sh
Last active April 26, 2024 13:10
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@LiuQixuan
LiuQixuan / InstallHdiff.ps1
Last active April 26, 2024 13:09
Install game_hdiff.zip for GenshinImpact
#先读我!
#$HdiffFilePath 为 升级包 完整路径
#$GamePath 为 游戏完整路径(非启动器路径)
#$ToolPath 为 hpatchz.exe 完整路径(如果有官方启动器就填写启动器完整路径,如果没有去该地址下载:https://github.com/sisong/HDiffPatch/releases)
param($HdiffFilePath="H:\GameSetup\setup\Genshine Impact\game_2.8.52_2.8.53_hdiff_tODgBJm8uenIGUX5.zip",$GamePath="H:\Games\Genshin Impact\Genshin Impact game")
$ToolPath = 'G:\ProgramFiles\hdiffpatch_v4.1.3'
$github = "https://gist.github.com/LiuQixuan/1a3810046c1152808fc9d65c699f8d8d"
$host.ui.RawUI.WindowTitle = "Install game_hdiff.zip for GenshinImpact"
@rengler33
rengler33 / scrape_with_logs.py
Last active April 26, 2024 13:09
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME
@slavistan
slavistan / cuda-ready-archlinux-for-wsl2.md
Last active April 26, 2024 13:08
CUDA-ready Archlinux for WSL2

This is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.

As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!

1. Install Archlinux

  1. Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.

Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.