Skip to content

Instantly share code, notes, and snippets.

View pridit's full-sized avatar

Jordan Heale pridit

View GitHub Profile
@giannisp
giannisp / gist:495fc0f1c0474088e5c5033f6db1a4d8
Last active March 29, 2022 15:55
Calculate SHA256 checksum
shasum -a 256 file.ext
@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
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
@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

@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,
@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