Skip to content

Instantly share code, notes, and snippets.

View jee-r's full-sized avatar
🔴
REC.

Jee jee-r

🔴
REC.
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active July 22, 2024 07:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@chenset
chenset / Proxy image with nginx
Last active August 14, 2022 05:24
Proxy image with nginx
server {
listen 80;
server_name domain.com;
merge_slashes off;
location ~ /(?<r>http://.*) {
resolver 8.8.4.4 8.8.8.8 4.2.2.2 valid=3600s ipv6=off;
proxy_set_header Referer "";
proxy_pass $r;
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 22, 2024 11:21
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active July 10, 2024 12:03
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@aaronpk
aaronpk / media-endpoint.php
Last active March 6, 2021 23:47
an example of a Micropub Media Endpoint https://www.w3.org/TR/micropub/#media-endpoint
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Authorization');
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) {
$format = 'text';
} else {
header('Content-Type: application/json');
$format = 'json';
}
@acundari
acundari / traefik-auth.conf
Last active December 6, 2022 09:41
Traefik fail2ban
# /etc/fail2ban/filter.d/traefik-auth.conf
[Definition]
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$
@pjobson
pjobson / FFMPEG_Notes.md
Last active June 13, 2024 17:35
FFMPEG Notes

Some Recipies for ffmpeg Usage

I screw around with ffmpeg a lot, here are some recipies which I frequently use.

Cropping

You need 4 variables:

  • W - Width of Output Video
  • H - Height of Output Video
@rwindegger
rwindegger / docker-compose.yml
Created September 30, 2016 21:51
This compose file runs a wordpress instance with 2 fpm and 2 nginx backend nodes, 1 varnish node and 1 nginx frontend node.
version: '2'
services:
memcached1:
image: memcached:latest
container_name: memcached1
hostname: memcached1
restart: always
networks:
- cache
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@nooges
nooges / Zen and the Art of IT Backup.md
Last active April 25, 2024 00:41
Zen and the Art of IT Backup

Zen and the Art of IT Backup

Principle 1 - Scope

Excited, the new apprentice jumped right into his Master’s training server.

The apprentice asked, “Master what files should I backup?”

The Master replied, “Does not the mother bird care for all her fledglings? Will not the shepherd watch over his entire flock? Therefore, one must backup all files in one’s care, no matter how small or insignificant we consider them to be. Each file has its importance and must not be overlooked.”