Skip to content

Instantly share code, notes, and snippets.

/** Emulate `cmd1 | cmd2 | more` pipeline using recursion.
http://stackoverflow.com/questions/20434124/recursive-piping-in-unix-environment
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actiona" version="3.10.1" scriptVersion="1.1.0" os="GNU/Linux"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionGoto" version="1.0.0"/>
<action name="ActionKey" version="1.0.0"/>
<action name="ActionKeyboardKeyCondition" version="1.0.0"/>
</actions>
<parameters/>
@fideloper
fideloper / certbot.sh
Last active April 18, 2024 14:43
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Used on Ubuntu 18.04 and 20.04
# Find instructions for other OSes here: https://certbot.eff.org/instructions
# Install Certbot via Snaps
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
sudo snap set certbot trust-plugin-with-root=ok
@rawc0der
rawc0der / crd2jsonschema.sh
Last active April 18, 2024 14:43
Extract openapi JSON schema from Kubernetes CRD manifest
#!/bin/bash
# Small utility function based on yq to extract openAPIV3Schema from CRD
# example: crd2jsonschema.sh ./crd-alertmanager.yaml
set -e
function crd2jsonschema() {
set -e
local xkgroup="x-kubernetes-group-version-kind"
local document="$1"
local openAPIV3Schema=$(mktemp -u)
@notlin4
notlin4 / without-auth_e-book_tutorial_免登入電子書教學.md
Last active April 18, 2024 14:41 — forked from aliyaliu368/without-auth_e-book_tutorial_免登入電子書教學.md
教學用電子書與相關工具免登入教學 | 本指令碼用於繞過臺灣電子書與教學工具的前端身分驗證,達成不需要教師帳號即可使用。支援 翰林、南一、康軒、何嘉仁 四大出版社 | 請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請自行承擔所有後果與風險

教學用電子書與相關工具免登入教學

使用本指令碼即代表你同意本免責聲明

免責聲明

請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請「自行承擔」所有後果與風險。

簡介

本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。

@jaonoctus
jaonoctus / SHA256SUM
Last active April 18, 2024 14:40
Umbrel 09/15/2023
e1da1d315a7e142661b541a681c4914fcbe9f0d797de7fe863b93c2bc49318f2 install_umbrel.sh
@BaiduDownloader
BaiduDownloader / How to download from Pan.Baidu.com without account.md
Last active April 18, 2024 14:40
How to download from Pan.Baidu.com without account

How to download from Pan.Baidu.com without an account|New method 2022-2023

Untitled-1-Recovered323.png

BaiduDownloader.com. This web tool allows you to download any file or folder from Pan Baidu to any device. All you need to do is enter your Baidu link and your email address and wait a few minutes for it to download for you. Use the code “FREEDOWNLOAD1GB”. You can download any file or folder up to 1GB for free.

Baidu Cloud comes from Baidu China and is currently not open to the public. You should transfer the project folder or download the file to another cloud to use it.

Steps

1. Open the website mentioned above and select item , or uses this direct link:

https://baidudownloader.com/product/transfer-pan-baidu-com-link-to-googgle-drive-link/

@cipharius
cipharius / sort-selections.kak
Last active April 18, 2024 14:39
Sort kakoune selections using GNU sort utility
define-command sort-selections -params 0.. -override -docstring '
sort-selections: Sort current selections using GNU sort utility
All parameters will be passed to the GNU sort utility
' %{
# Copy current selections to a temporary sort buffer
execute-keys %{"sy}
edit -scratch *sort-selections*
execute-keys %{"s<a-p>}
# Seperate selections with null characters
@gmk57
gmk57 / CoroutineTimer.kt
Last active April 18, 2024 14:38
Coroutine-based solution for delayed and periodic work
/**
* Coroutine-based solution for delayed and periodic work. May fire once (if [interval] omitted)
* or periodically ([startDelay] defaults to [interval] in this case), replacing both
* `Observable.timer()` & `Observable.interval()` from RxJava.
*
* In contrast to RxJava, intervals are calculated since previous run completion; this is more
* convenient for potentially long work (prevents overlapping) and does not suffer from queueing
* multiple invocations in Doze mode on Android.
*
* Dispatcher is inherited from scope, may be overridden via [context] parameter.
@Cortexelus
Cortexelus / udio.py
Last active April 18, 2024 14:36
Automate Udio (2024-04-13)
# AUTOMATE UDIO
# by DADABOTS dadabots.com
# was working on 2024-04-13
# tldr; get your login cookie, use it to automate udio from python
import requests
import json
from time import sleep
import re