Skip to content

Instantly share code, notes, and snippets.

View donutloop's full-sized avatar

donutloop

View GitHub Profile
# Make sure you have Anaconda installed
# This tutorial assumes you have an Nvidia GPU, but you can find the non-GPU version on the Textgen WebUI github
# More information found here: https://github.com/oobabooga/text-generation-webui
conda create -n textgen python=3.10.9
conda activate textgen
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
python -m pip install -r requirements.txt

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@donutloop
donutloop / main.go
Last active October 14, 2017 13:25
Using dependency injection in Go
package main
import "log"
type printerFunc func(message string, args ...interface{})
func helloWrapper(p printerFunc) func(string, ...interface{}) {
return func(message string, arguments ...interface{}) {
p(message, arguments...)
}
@donutloop
donutloop / github_bugbountyhunting.md
Created October 7, 2017 14:25 — forked from EdOverflow/github_bugbountyhunting.md
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
package maputil
type StringMap struct {
mapping map[string]string
order []string
}
func (sm *StringMap) Set(key, value string) {
sm.mapping[key] = value
sm.order = append(order, key)
The Package reflect in the Go standard library implements run-time reflection, allowing a program to manipulate objects with arbitrary types.
We can build with the reflection package a kind of generic functionality. Because this package give us the possibility to determine the meta information of a function and it's input and output arguments while runtime.
Be careful when you start to use the reflection package it's hard to debug run time errors. For more information about reflection, I can recommend the following article about reflection.
See "The Laws of Reflection" for an introduction to reflection in Go: https://golang.org/doc/articles/laws_of_reflection.html
If you want see reflection in action below is a example: