Skip to content

Instantly share code, notes, and snippets.

View GalaxySH's full-sized avatar
🌺
01100101011101000110010101110010011011100110000101101100

Stefan Hauge GalaxySH

🌺
01100101011101000110010101110010011011100110000101101100
View GitHub Profile
@TheOnlyWayUp
TheOnlyWayUp / README.md
Last active April 19, 2025 01:20
Like all songs in a Youtube Music Playlist

This script likes all the songs in a Youtube Music Playlist at once.

How to use:

  • Visit a Playlist's page on ytm (URL looks like: https://music.youtube.com/playlist?list=...
  • Press ctrl + shift + j. This opens the Developer Console.
  • Copy the script in this gist (That's in script.js)
  • Paste the code into the Developer Console on the ytm Tab, hit enter.
  • Great, you're done!

Star ⭐ this gist if it was useful. Follows to my GitHub Profile are appreciated.

Log4J CVE Advisory

The Problem

Log4J has a feature called Java Naming and Directory Interface (shortened to JNDI in this document), which allows a Java program to reach out to an external source to gather data.
If you put a section of text containing ${jndi:query} into the log, the Log4J library will try to resolve the query.
This can be combined with the Lightweight Directory Access Protocol (LDAP) to connect to a remote server.

However, because JNDI is built for retrieving data, and JNDI is a Java program, if you put a JNDI query using LDAP into a log, it will connect to the given site, download a file, and then execute it.
This is called Remote Code Execution.

@amalmurali47
amalmurali47 / edit_commit_history.md
Last active March 31, 2025 23:00
Change ownership of selected older commits in Git
  1. Clone the repo.
  2. Use git rebase -i --root
  3. vim will open. Select the commits you want to modify by changing pick to edit. If you would like to change all the commits, perform the following replace: :%s/^pick/edit/g. This command changes all instances of "pick" at the start of lines to "edit".
  4. You will now be shown all the selected commits one by one. Each commit message will be displayed. You have two options:
    • If you would like to keep the commit author details the same, do a git rebase --continue.
    • If you would like to change it to a different name/email, do git commit --amend --reset-author. If --reset-author is specified, it will use the details from your git config. (If you need to specify an alternate name/email, you can do so with --author="John Doe <[email protected]>". If you would like to change the time to a previous date, you can do so with --date "2 days ago".)
  5. Do the same for all the commits and finish the rebase.
  6. Perform git push -f origin master to

Steps to enable shaders:

  1. DL the optifine mod jar, the latest one for version 1.12.2. https://optifine.net/downloads click on mirror if you want to avoid ads (or don't to support the author)
  2. Open the minecraft install folder. If you installed via twitch desktop app, you can open this by right clicking on "FTB revelations" and choosing open folder, or clicking on it and then cog wheel top right -> open folder.
  3. Exit minecraft if you have it open.
  4. copy / move the optifine jar into the mods folder opened in step 2.
  5. go back to parent folder -> config folder -> open file called astralsorcery.cfg -> Search for weakSky-> you'll see lines like this:
    S:weakSkyRenders <
     >
@GalaxySH
GalaxySH / meta-tags.md
Last active May 18, 2019 19:09 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content="your, tags">
<meta name='description' content="150 words">
<meta name='subject' content="your website's subject">
<meta name='copyright' content="company name">
@nickcernis
nickcernis / readme.md
Last active April 18, 2025 17:05
Exclude node_modules and .git from Backblaze backups on Mac

Exclude node_modules and .git from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add these rules inside the bzexclusions tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@jayvdb
jayvdb / generate-multiple-new-file-squashes.sh
Last active January 29, 2025 16:13
Generate git-rebase-todo-list to squash similar commits
# Warning: Due to child_hash optimisation this doesnt support merges
# Usable with GIT_EDITOR='touch'
# TODO: Create a better GIT_EDITOR command that
# strips only blank lines in commit body
# TODO: Support merges
# different levels of merging:
author_tag_format="%ae"
same_author_day_tag_format="%ae-%ad"
@keithweaver
keithweaver / domain-to-aws-ec2-instance.md
Created March 20, 2017 23:49
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
@stefansundin
stefansundin / .Xmodmap
Last active March 6, 2024 18:23
Xmodmap for Chromebook Pixel. This is customized for a Swedish layout, you might want to edit these lines for your preferred layout. Use 'xmodmap -pke' to print your current Xmodmap.
! Chromebook Pixel Xmodmap
! https://gist.github.com/stefansundin/6987698
! setxkbmap -layout se
! xmodmap .Xmodmap
! xev
! Startup applications:
! Command: sh -c "xmodmap ~/.Xmodmap"
! I also manually bind F4 and F5 in Ubuntu's keyboard shortcuts:
@kevinSuttle
kevinSuttle / meta-tags.md
Last active April 9, 2025 13:51 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags