Skip to content

Instantly share code, notes, and snippets.

@Fishezzz
Fishezzz / quine.sh
Last active June 1, 2023 20:31
Bash Quine
# quine
f(){ printf "\x$(printf %x 39)"; }; p='f(){ printf "\x$(printf %x 39)"; }; p=; echo ${p::38}$(f)${p}$(f)${p:38}'; echo ${p::38}$(f)${p}$(f)${p:38}
# quine with text
f(){ printf "\x$(printf %x 39)"; }; p='f(){ printf "\x$(printf %x 39)"; }; p=; echo ${p::38}$(f)${p}$(f)${p:38}'; echo ${p::38}$(f)${p}$(f)${p:38} INSERT YOUR TEXT HERE!
# shorter quine
f(){ printf %b \\u0027; }; p='f(){ printf %b \\u005C; }; p=; echo ${p::29}$(f)${p}$(f)${p:29}'; echo ${p::29}$(f)${p}$(f)${p:29}
0.0.0.0 ads.fingersoft.net
0.0.0.0 ads3.fingersoft.net
@Fishezzz
Fishezzz / Advert_topics.user.js
Created November 1, 2022 16:09
Tampermonkey user script to select "view less" for all ad topics in the ads settings on Facebook
// ==UserScript==
// @name Advert topics
// @author Fishezzz
// @version 0.0.2
// @description Download Facebook & Instagram Album by One Click.
// @namespace https://gist.github.com/Fishezzz
// @match https://www.facebook.com/adpreferences/ad_topics?run=1
// @icon https://static.xx.fbcdn.net/rsrc.php/yD/r/d4ZIVX-5C-b.ico
// @grant none
// @run-at document-idle
@Fishezzz
Fishezzz / bulk_url_download.py
Created June 11, 2022 10:26
Python script to bulk download files with URLs provided in a text file.
#!/usr/bin/python
import sys, os
import requests
if len(sys.argv) < 2:
print('Need 2 arguments: <file-with-urls> <download-folder>')
exit(1)
url_file = sys.argv[1]
@Fishezzz
Fishezzz / mirror.sh
Last active June 11, 2022 09:53 — forked from ethomson/mirror.sh
Script to properly mirror a git repository.
#!/bin/sh
#
# Author: ethomson (Edward Thomson)
# Gist: https://gist.github.com/ethomson/3e8e9cabf360917d52a689d57bcf1729
# Article: https://edwardthomson.com/blog/mirroring_git_repositories.html
#
# TL;DR
# Hosting provider stores information about pull requests in special read-only references,
# which cause errors when you want to mirror a repository the Github way.
@Fishezzz
Fishezzz / server.js
Last active June 11, 2022 10:03
Quick & dirty node webserver to server files and directories
// npm init
// npm install @hapi/hapi @hapi/inert
'use strict'
const Hapi = require('@hapi/hapi');
const init = async () => {
const server = Hapi.server({
port: 3210,
@Fishezzz
Fishezzz / top-like.md
Last active November 15, 2022 18:03
List of all 'top'-like CLI programs on Linux
@Fishezzz
Fishezzz / setup_mosquitto_mqtt_broker_with_man_pages.md
Last active April 2, 2020 01:01
Setup a Mosquitto MQTT broker + man pages

Setup mosquitto MQTT broker

1. Install the mosquitto MQTT Broker

mosquitto is a popular MQTT broker that is well-supported on Debian-based Linux platforms such as Raspbian. It’s easy to install using apt:

sudo apt-get install mosquitto

2. Enable the mosquitto broker

Enable the broker and allow it to auto-start after reboot using the following command: