Skip to content

Instantly share code, notes, and snippets.

@greymd
greymd / sudo新一.md
Last active May 12, 2024 08:52
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@abhishtagatya
abhishtagatya / autoclip.py
Last active May 12, 2024 08:50
Automation Script to Edit Videos for TikTok using Python
# _____ _ _____ _ _
# | _ |_ _| |_ ___| | |_|___
# | | | | _| . | --| | | . |
# |__|__|___|_| |___|_____|_|_| _|
# |_|
#
# By Abhishta (github.com/abhishtagatya)
# pip install gTTs
# pip install moviepy
# UFW Commands to make your life eaiser
# Install UFW
sudo apt-get update
sudo apt-get install ufw
# View UFW Status
sudo ufw status
# Enable UFW
@pourmand1376
pourmand1376 / git-lfs-install.md
Last active May 12, 2024 08:41
Single User Installation of Git-LFS without sudo

I wanted to install GIT-Lfs on my user account without access to server root account. I write this to my future self.

  1. Download tar.gz file from git-lfs website.
wget https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz

2.Untar it

tar xvf git-lfs-linux-amd64-v3.2.0.tar.gz
@ggicci
ggicci / get_qqmusic_songlist.js
Created October 29, 2023 20:26
QQ音乐获取歌单列表
// 在浏览器打开如下 URL,替换 id 为你自己的歌单 id
// https://y.qq.com/musicmac/v6/playlist/detail.html?id=3011946123
// Console Script:
const songList = [];
for (const doc of document.querySelectorAll('.songlist__li')) {
songList.push({
song: doc.querySelector('.mod_songname__name').text,
singer: doc.querySelector('.singer_name').text,
album: doc.querySelector('.album_name').text,
@silver-xu
silver-xu / ts-boilerplate.md
Last active May 12, 2024 08:41
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@larry0x
larry0x / settings.json
Created May 11, 2024 18:33
Customize VSCode watermark logo
{
"apc.stylesheet": {
".editor-group-watermark > .letterpress": "background-image: url(https://raw.githubusercontent.com/Aikoyori/ProgrammingVTuberLogos/main/VSCode/VSCode.png) !important; width: unset !important; height: 250px; aspect-ratio: 16/9 !important; filter: drop-shadow(5px 5px 5px #222); margin-bottom: 2rem;"
}
}
@aki-hp
aki-hp / modorganizer2-nxm-broker.sh
Last active May 12, 2024 08:35
Edited MO2 Broker for rockerbacon's script suite so that even if the NXMHandler fails, the download will still proceed. Might be useful for Steam Deck users (or Flatpak Protontricks users in general).
#!/usr/bin/env bash
# SUPPLY YOUR PERSONAL NEXUS API KEY HERE (nexus_apikey="yourNexusAPIKeyInsideDoubleQuotes")
nexus_apikey="yourNexusAPIKeyInsideDoubleQuotes"
### PARSE POSITIONAL ARGS ###
nxm_link=$1; shift
if [ -z "$nxm_link" ]; then
zenity --ok-label=Exit --ellipsize --error --text \
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active May 12, 2024 08:35 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->