Skip to content

Instantly share code, notes, and snippets.

@fieri
fieri / scan.sh
Created August 30, 2024 05:47 — forked from josephbolus/scan.sh
Use the following tiny script to make PDFs look like they have been scanned.
#!/bin/sh
# Help message
show_help() {
echo
echo "Convert PDFs to make them look like they have been scanned"
echo "Example: $0 file.pdf"
}
# Check if the provided argument is not empty
@fieri
fieri / docker-registry-mirrors.md
Created June 16, 2024 01:42 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@fieri
fieri / README.md
Created April 9, 2024 14:05 — forked from mavuriel/README.md
Script to setup LAMP

Setup LAMP

Script to setup LAMP - Apache - Mariadb - PHP in debian/ubuntu based distros

Additionally installing composer and PHP 8.0 to 8.3 versions

Setup instructions from:

https://blog.csdn.net/u013010310/article/details/52371440
1、将文件当作源推送到RTMP服务器
ffmpeg -re -i localFile.mp4 -c copy -f flv rtmp://server/live/streamName
参数解释
-r 以本地帧频读数据,主要用于模拟捕获设备。表示ffmpeg将按照帧率发送数据,不会按照最高的效率发送
@fieri
fieri / Template.md
Created February 16, 2024 13:59 — forked from Delta-in-hub/Template.md
Obsidian-Zotero-Integration Template

{{title}}

[!info] Bibliography {{bibliography|replace("\n"," ")}}

Information

Key Value
Date {% if date %} {{date
Author {{authors}}{{directors}}

Beginner's set up for AidenLX’s Zotero Integration Plugin

The current official documentation is incomplete, and inaccessible for most users, however I believe it is the best zotero integration so far, if only it can eventually match the features of Bibnotes Formatter. I want to make a simple guide for users who want to quickly set up the plugin with simple use cases.

In this guide I will distill what I gathered from a day of going through the Obsidian forum thread, the github discussions and issues pages, the API guide from the documentation, and brute-force trial and error. Much of the api stuff will require knowledge of eta and javascript, which unfortunately I have limited experience with. Perhaps others can chime in and

@fieri
fieri / bash-help.sh
Created June 5, 2022 23:39 — forked from yangfch3/bash-help.sh
[bash 速查手册] #bash #cheatsheets
##############################################################################
# BASH CHEATSHEET (中文速查表) - by skywind (created on 2018/02/14)
# Version: 43, Last Modified: 2018/04/02 17:00
# https://github.com/skywind3000/awesome-cheatsheets
##############################################################################
##############################################################################
# 常用快捷键(默认使用 Emacs 键位)
##############################################################################
@fieri
fieri / simulate_scanned_PDF.md
Created April 11, 2022 05:13 — forked from scf37/simulate_scanned_PDF.md
Simulate a scanned PDF with ImageMagick

Simulate a scanned PDF with ImageMagick

  1. Download and install Ghostscript and ImageMagick + Convert Module
  2. Execute the following command in the console (change the filename)
$ convert -density 200 INPUT.pdf -rotate 0.3 +noise Multiplicative -format pdf  -quality 85 -compress JPEG -colorspace gray OUTPUT.pdf

Description of the options

  • -density: set the input DPI to 200
  • -rotate: set Page rotation to 0.3 degrees
@fieri
fieri / scanner.sh
Created April 11, 2022 05:13 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@fieri
fieri / scanScope.txt
Created April 4, 2022 13:52 — forked from DorkForce/scanScope.txt
Console script - Search breakpoint model for value. SYNTAX: scanScope($scope.model, 'Fred');
console.log("Usage Syntax: scanScope(objectToScan, 'scanFor', ['whatToIgnore']); %c(whatToIgnore is optional and can be a string, or an array of strings) (scanScope can be shortened to ss)", 'color: red');
var abortAtLevel = 20,
callStack = 0,
errArray = [],
funArray = [],
scanLoop = function (whatToScan, scanValue, whatToIgnore, parentTree) {
scanValue = scanValue.toLowerCase();
if (Array.isArray(whatToIgnore)) {
whatToIgnore.forEach(function (ignoreVal) {
ignoreVal = lowerCase(ignoreVal);