Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@LKS90
LKS90 / cheatsheet.md
Last active April 30, 2024 14:45
Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io and markdown-preview-plus to write math stuff

Description

Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io and 📦markdown-preview-plus to write math stuff. 📦keyboard-localization is necessary when using an international layout (like [swiss] german).

Further Reference and source: ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf

Example expressions / functions

@rschuetzler
rschuetzler / 00_get_certificate.sh
Last active April 30, 2024 14:45
Using LetsEncrypt with Amazon Linux 2023
#!/usr/bin/env bash
# Place in .platform/hooks/postdeploy directory
sudo certbot -n -d YOURDOMAINHERE --nginx --agree-tos --email YOUREMAILHERE
@dpaluy
dpaluy / README.md
Last active April 30, 2024 14:45
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!
import Foundation
struct Post: Decodable {
let id: String
let title: String
let body: String
}
struct GraphQLResult<T: Decodable>: Decodable {
let object: T?
@yoggy
yoggy / challenge.md
Created February 19, 2012 08:22
5761455 prime numbers - SECCON CTF Challenge post-game discussion

問題

2以上30以下の素数は次の10個です。

2 3 5 7 11 13 17 19 23 29

これらの素数の中で一番多く出現する数字は1で、5個出現します。2番目に多く出現する数字は2と3がそれぞれ3個ずつ出現します。

2以上10000以下の素数は1229個あり、それらの素数の中で一番多く出現する数字の個数は1の681個です。また2番目は3の677個、3番目は7の652個です。

@rphlmr
rphlmr / clear-db.ts
Last active April 30, 2024 14:41
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@blessanm86
blessanm86 / german-driving-license.md
Last active April 30, 2024 14:40
Quick Ref Notes for German Driving License Test

This is unmaintained and was created for personal use. As I passed the exam I have no use to keep this up to date. Feel free to fork

What are the consequences for a person driving a motor vehicle under the influence of drugs (e.g. hashish, heroin, cocaine)?

[x] Confiscation of driving licence or driving ban
[x] Compulsory medical/psychological examination
[x] Fine and/or imprisonment

In which instances do you have to approach a pedestrian crossing with particular care?

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 30, 2024 14:40 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@mcroach
mcroach / storing-image-assets-in-repo.md
Last active April 30, 2024 14:40
Using an 'assets' branch to store images in your repo

Storing image assets in your repo and referencing in markdown

Create an assets branch and make the initial commit

git checkout --orphan assets
git reset --hard
cp /path/to/cat.png .
git add .
git commit -m 'Added cat picture'
git push -u origin assets