Skip to content

Instantly share code, notes, and snippets.

View jostyee's full-sized avatar
💭
脑壳疼

Josta Yee jostyee

💭
脑壳疼
  • Singapore
View GitHub Profile
@andygeorge
andygeorge / steamdeck_ssh_instructions.md
Last active February 21, 2024 06:54
Steam Deck `ssh` instructions

These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).

This gist assumes the following:

  • you have a Steam Deck
  • you have a home PC with access to a Linux shell that can ssh, ssh-keygen, and ssh-copy-id
  • your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck

NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:

  • removing the systemd config for sshd.service, which would prevent the service from automatically starting on boot
  • removing the sudoers.d config, which would reenable passwords for sudo
@1player
1player / bazarr.docker-compose.yml
Last active February 17, 2024 20:41
Poor man's media centre
# Bazarr downloads subtitles
version: "3.4"
services:
bazarr:
image: linuxserver/bazarr:1.0.5-development
container_name: bazarr
restart: unless-stopped
environment:
- TZ=Europe/London
@radiantly
radiantly / noMangleGoogle.user.js
Last active December 28, 2023 04:31
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
@logic2design
logic2design / Things 3 to Calendar - Time Block.applescript
Last active July 6, 2023 14:58
This workflow will let you chose a Things 3 task to add to your selected Calendar so time can be blocked out to address the task.
##############################################
# Title: Things3 To Calendar - Time Block
##############################################
# Iain Dunn
# Logic2Design
# www.logic2design.com
# Last update: 26-01-2022
# Version: 4
@ahmedre
ahmedre / goodreads_to_book_track.py
Last active April 1, 2023 22:02
Goodreads export to Book Track friendly Importer
import csv
import requests
import sys
"""
This script converts a Goodreads export csv into a Book Track friendly csv.
It does this by querying Google Books' api for each book and adding its id,
along with removing some of the other unnecessary fields in the original
export.
@leplay
leplay / accounts-assets.bean
Last active October 12, 2023 05:16
Beancount + Costflow
2019-01-01 open Assets:CN:Cash
2019-01-01 open Assets:CN:Alipay ; 支付宝余额
2019-01-01 open Assets:CN:Wechat ; 微信零钱
2019-01-01 open Assets:CN:DebitCard:CMB ; 招商银行储蓄卡
2019-01-01 open Assets:CN:DebitCard:BOC ; 中国银行储蓄卡
2019-01-01 open Assets:CN:FinTech:LCT ; 微信理财通
2019-01-01 open Assets:CN:FinTech:ZZY ; 招行朝朝盈
2019-01-01 open Assets:CN:FinTech:YEB ; 支付宝余额宝
@Checksum
Checksum / bitwarden_rs.sh
Last active August 19, 2021 02:39
Cross compiling bitwarden_rs for Raspberry Pi
# Requires git and docker
# clone bitwarden_rs
git clone https://github.com/dani-garcia/bitwarden_rs
cd bitwarden_rs
# Use rust docker container to build everything
docker run --rm -it -v `pwd`:/bitwarden rust bash
# Download pi tools and openssl
@schl3ck
schl3ck / Import Script from Gist.js
Last active February 29, 2024 07:22
Easily import Scriptable Scripts from Github Gists
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: download;
// share-sheet-inputs: url;
/********************************************
* *
* Import Script from Gist *
* *
* This script imports files from a Github *
* Gist. *
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@ttscoff
ttscoff / sizes.rb
Last active July 12, 2021 03:33
sizes: Calculate and sort all filesizes for current folder
#!/usr/bin/env ruby
# Sizes - Calculate and sort all filesizes for current folder Includes
# directory sizes, colorized output Brett Terpstra 2019 WTF License
VERSION = "1.0.1"
require 'shellwords'
# Just including term-ansicolor by @flori and avoiding all the
# rigamarole of requiring multiple files when it's not a gem... - Brett
#