Skip to content

Instantly share code, notes, and snippets.

View DavidEredics's full-sized avatar

Dávid Eredics DavidEredics

View GitHub Profile
@Someguy123
Someguy123 / debian-initramfs-ipv6-hook-script
Last active February 12, 2024 15:41 — forked from zajdee/debian-initramfs-ipv6-hook-script
Scripts to support IPv6 networking in Debian pre-boot (initramfs) environment
#!/bin/sh
##########################################################################################
# Script to be placed in /etc/initramfs-tools/hooks/ipv6
#
# These initramfs IPv6 scripts were originally made by zajdee, and were modified by Someguy123
# at Privex Inc. ( https://www.privex.io ) to fix some issues and add debug logging.
#
# It can be found online here: https://gist.github.com/Someguy123/8092bdc9834aa210fb4bd1523e9a1c38
#
# (Original Gist this was based off of (broken script!): https://gist.github.com/zajdee/65aad61f35d3a63c56c7d1cc76c22e14)
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@DavidEredics
DavidEredics / update_ip.sh
Last active January 5, 2022 20:04
Bash script to update Cloudflare DNS records to the current ip
#!/bin/bash
api_token="" #Cloudflare API Token
zone_identifier="" #Zone ID
record_name="" #the dns records name (e.g. example.com)
ttl=1 #Time to live, in seconds (60-86400 or 1 for automatic)
proxied=true #whether the record should proxied by Cloudflare (true|false)
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active June 30, 2024 02:37
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active July 22, 2024 09:05
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@churro-s
churro-s / LetsEncrypt_HTTPS_plex.MD
Last active July 21, 2024 22:18
Setup Let's Encrypt certificate for use with Plex Media Server on Ubuntu
@CrookedNumber
CrookedNumber / gist:8964442
Created February 12, 2014 21:02
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.