Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
magnetikonline / README.md
Last active May 20, 2024 00:22
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vertical Bar with Images</title>
<style>
body {
display: flex;
justify-content: center;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vertical Bar with Images</title>
<style>
body {
display: flex;
justify-content: center;
@nondebug
nondebug / known_gamepads.txt
Last active May 20, 2024 00:19
A list of vendor and product IDs for known USB and Bluetooth gamepad devices
0000:006f JessTechColourRumblePad
0001:0329 Sl6566
0005:05ac Mocute
0010:0082 AkishopCustomsPs360Plus
0078:0006 MicrontekUsbJoystick
0079:0006 PcTwinShock
0079:0011 DragonRiseGamepad
0079:1800 MayflashWiiUProAdapter
0079:181a VenomLimitedArcadeJoystick
0079:181b VenomArcadeJoystick
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vertical Bar with Images</title>
<style>
body {
display: flex;
justify-content: center;
@mafredri
mafredri / smb.conf
Last active May 20, 2024 00:08
Samba config for Open PS2 Loader (PlayStation 2)
# This setup works pretty well for OPL with a network link that travels through
# two UniFi switches and connects to a Samba server running inside Docker. The
# host OS is Debian with a ZFS filesystem and the container OS is also Debian.
# Latest Samba (4.11+).
[global]
# ======================
# General Samba settings
# ======================
log level = 1
@zjhiphop
zjhiphop / 分布式系统学习资料.md
Created July 23, 2015 06:13
分布式系统学习资料

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@fabiotatsuo
fabiotatsuo / rust.md
Last active May 20, 2024 00:03
Install Rust, Cargo and Rustup Toolchain inside FreeBSD 12 Jail
  1. Install rust

    jail-app is name of jail.

    $ jexec jail-app
    $ pkg install curl
    

    Download and install rustup
    $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

@MattPitlyk
MattPitlyk / fine-tuning-gpt-2-on-a-custom-dataset.ipynb
Created February 14, 2020 19:14
Fine-Tuning GPT-2 on a Custom Dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ageis
ageis / systemd_service_hardening.md
Last active May 19, 2024 23:58
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict