Skip to content

Instantly share code, notes, and snippets.

@jbevain
jbevain / README.md
Last active November 16, 2023 12:11
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@Hunsin
Hunsin / router.go
Last active August 26, 2023 16:23
The package wraps julienschmidt's httprouter, making it support functions such as middlewares, sub/group routing with same prefix. Written in Go (Golang).
package router
import (
"context"
"net/http"
gpath "path"
"github.com/julienschmidt/httprouter"
)
@getify
getify / 1.js
Last active July 27, 2023 15:50
demonstrating how to use "nodegit" to modify and read from a local bare git repo
/*
NOTE: This code assumes a bare git repo in ./bare-git/,
which should have at least one text file in its root,
named "greetings.txt".
This code updates the contents of a "greetings.txt"
file, and creates a new file called "greetings-XXX.txt"
(with XXX being a random number). It then creates a new
commit for these changes. Finally, it reads and dumps
the new current contents of the repo, file by file.
@renevo
renevo / go-wsl.md
Created September 5, 2018 18:56
Easily update/install Go in wsl

Updating/Installing Go in WSL

Remove

Removes older versions

sudo rm -rf /usr/local/go* && sudo rm -rf /usr/local/go
@jarrodek
jarrodek / commit.js
Created November 9, 2019 02:18
This gist demonstrates how to use nodegit to sign commits using GPG keys.
const nodegit = require('nodegit');
const path = require('path');
const fs = require('fs-extra');
const openpgp = require('openpgp');
const fileName = 'newfile.txt';
const fileContent = 'hello world';
const directoryName = 'salad/toast/strangerinastrangeland/theresnowaythisexists';
/**
* This example creates a certain file `newfile.txt`, adds it to the git
@Haaroon
Haaroon / Rename branch from main to master
Last active August 2, 2023 21:32
Rename branch from main to master
git branch -m main master
git push -u origin master
git remote set-head origin master
# Now go to github in a browser,
# open the repo, click settings, branch and change the default branch to master
git push origin --delete main
@emo-eth
emo-eth / chain_funcs.sh
Last active June 22, 2023 14:43
Helper functions for interacting with chains and Foundry tests. Source from .zshrc etc
###########
# Imports #
###########
# the RPCs file should include RPC URLs and Etherscan API Keys for relevant networks
# (in a separate file so they don't get committed)
source "$(dirname "$0")/rpcs.sh"
# any useful addresses for various networks for easy reference
source "$(dirname "$0")/addresses.sh"
# any useful functions and definitions for interacting with Seaport
@0xask3
0xask3 / coverage.sh
Created March 1, 2023 10:55
Readable forge coverage report
#Generate coverage report
forge coverage --report lcov
#Remove unwanted files
lcov --remove lcov.info -o lcov.info 'node_modules/*' 'script/*'
#Generate html file
genhtml lcov.info -o ./coverage
#Remove lcov file