Skip to content

Instantly share code, notes, and snippets.

@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.

@opyate
opyate / README.md
Last active April 26, 2024 13:07
Simple no-cache gamedev-friendly Python 3 webserver for testing web builds locally

Seeing this when running an HTML5 Godot game?

image

This is a simple no-cache Python 3 gamedev-friendly webserver which runs on port 4443.

Run with

python3 gamedevweb.py
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 26, 2024 13:06
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@shuson
shuson / description-mysql_weakly-referenced object
Last active April 26, 2024 13:04
weakly-referenced object when connect to mysql in python
I came across this issue using the following code file
the error message is ReferenceError: weakly-referenced object no longer exists
reason is in the mysql/connector/cursor.py file
see these lines:
def _set_connection(self, connection):
"""Set the connection"""
try:
const title_text = "𝗜'𝗺 𝗜𝘇𝘂𝗺𝗶...!!";
const body_text = "𝐄𝐘𝐏𝐙";
const source_url = "https://github.com/sataniceypz/Izumi-xd";
large_thumb = false; // use true for larger thumbnail
const logo = "https://i.imgur.com/4AKWozV.jpeg";
var audios = ["https://i.imgur.com/tceIGIW.mp4","https://i.imgur.com/v1bYXlb.mp4","https://i.imgur.com/cGJ1Gyi.mp4","https://i.imgur.com/6HXfyVr.mp4","https://i.imgur.com/dPjoh3s.mp4","https://i.imgur.com/pbtSy0M.mp4","https://i.imgur.com/sDwfg29.mp4","https://i.imgur.com/8vhaz82.mp4"];
// ===================================================================================
// EZRA-XD MENTION AUDIO SENDER
//
/*
Created by:- Rishi Tiwari
Website:- TrickSumo.com
Video Tutorial:- https://youtu.be/nLzC0-VaqDs
Libraries used:-
https://github.com/mobizt/Firebase-ESP8266/