Skip to content

Instantly share code, notes, and snippets.

View pridit's full-sized avatar

Jordan Heale pridit

View GitHub Profile
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@parnic
parnic / Program.cs
Last active September 24, 2020 01:01
Assassin's Creed IV Black Flag PC Multiplayer launcher for Steam. Compile this and add it as a non-Steam game in your Steam library. It'll launch just like the SP game, but straight into the MP portion. For bonus speed, delete or rename the following 4 files under AC4\multi\videos: abstergo_logo.bik ac4bf_logo.bik TWIMTBP.bik ubi_logo.bik
using System.Diagnostics;
namespace ac4bfmp_launcher
{
class Program
{
static void Main(string[] args)
{
var p = new ProcessStartInfo(@"path\to\Ubisoft Game Launcher\UbisoftGameLauncher.exe", "-upc_uplay_id 437 -upc_game_version 0 -upc_exe_path [path_to_exe_base64_encoded] -upc_working_directory [working_directory_base64_encoded] -uplay_steam_mode");
// for example, my AC4BFMP.exe is located at D:\games\Steam\steamapps\common\Assassin's Creed IV Black Flag\AC4BFMP.exe,
@tswaters
tswaters / git-subdirectory-tracking.md
Last active April 10, 2025 08:33
Adding subdirectory of a remote repo to a subdirectory in local repo

This is way more complicated than it should be. The following conditions need to be met :

  1. need to be able to track and merge in upstream changes
  2. don't want remote commit messages in master
  3. only interested in sub-directory of another repo
  4. needs to go in a subdirectory in my repo.

In this particular case, I'm interested in bringing in the 'default' template of jsdoc as a sub-directory in my project so I could potentially make changes to the markup it genereates while also being able to update from upstream if there are changes. Ideally their template should be a separate repo added to jsdoc via a submodule -- this way I could fork it and things would be much easier.... but, it is what it is.

After much struggling with git, subtree and git-subtree, I ended up finding this http://archive.h2ik.co/2011/03/having-fun-with-git-subtree/ -- it basically sets up separate branches from tracking remote, the particular sub-directory, and uses git subtree contrib module to pull it all togther. Following are

prop_a4_pile_01
prop_a4_sheet_01
prop_a4_sheet_02
prop_a4_sheet_03
prop_a4_sheet_04
prop_a4_sheet_05
prop_abat_roller_static
prop_abat_slide
prop_acc_guitar_01
prop_acc_guitar_01_d1
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@giannisp
giannisp / gist:495fc0f1c0474088e5c5033f6db1a4d8
Last active March 29, 2022 15:55
Calculate SHA256 checksum
shasum -a 256 file.ext
@MarMed
MarMed / README.md
Last active March 19, 2025 12:55
Routing plex traffic through an SSH tunnel

Routing plex traffic through an SSH tunnel

This guide creates a reverse SSH tunnel to route all Plex server traffic through it.

Step 2 is done on the tunnel, all other steps are done on the plex server.

1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)

On plex server:

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 30, 2025 03:07
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@gbot
gbot / wp_offload_media_db_migrate.json
Last active March 20, 2023 20:24
Migrate a WordPress database so that existing media items are served from Amazon S3 or CloudFront. Requires the WP Offload S3 Lite plugin.
{
"use_https": "",
"purge_amazonS3_info": ""
}
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active April 30, 2025 07:53
Conventional Commits Cheatsheet

Conventional Commit Messages starline

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

Tip

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

Commit Message Formats

Default