Skip to content

Instantly share code, notes, and snippets.

View Tristan-Trainual's full-sized avatar

Tristan-Trainual

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active December 21, 2024 18:11
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@JettIsOnTheNet
JettIsOnTheNet / awesome_lua_cheatsheet.md
Last active December 24, 2024 01:23
Awesome Lua Cheat Sheet

Lua Cheat Sheet

Lua is a lightweight, efficient, and versatile scripting language known for its simplicity and extensibility. It was created by Roberto Ierusalimschy, Waldemar Celes, and Luiz Henrique de Figueiredo at the Pontifical Catholic University of Rio de Janeiro in Brazil in 1993. The name "Lua" translates to "moon" in Portuguese, reflecting the language's intention to be a small and beautiful extension to existing systems. Lua is often used as an embedded scripting language in various applications and has gained popularity in the game development industry for its ease of integration and speed. Its clean and intuitive syntax, along with a powerful set of features, makes Lua a preferred choice for developers seeking a fast and efficient language for their projects.

1. Comments

-- This is a single-line comment

--[[
   This is a multi-line comment
@JoaoLages
JoaoLages / RLHF.md
Last active December 26, 2024 18:26
Reinforcement Learning from Human Feedback (RLHF) - a simplified explanation

Maybe you've heard about this technique but you haven't completely understood it, especially the PPO part. This explanation might help.

We will focus on text-to-text language models 📝, such as GPT-3, BLOOM, and T5. Models like BERT, which are encoder-only, are not addressed.

Reinforcement Learning from Human Feedback (RLHF) has been successfully applied in ChatGPT, hence its major increase in popularity. 📈

RLHF is especially useful in two scenarios 🌟:

  • You can’t create a good loss function
    • Example: how do you calculate a metric to measure if the model’s output was funny?
  • You want to train with production data, but you can’t easily label your production data

A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation


A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example

Curating Complexity: A Guide to Big-O Notation

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active December 29, 2024 02:37
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent

Awesome Penetration Testing Awesome

A collection of awesome penetration testing resources.

Penetration testing is the practice of launching authorized, simulated attacks against computer systems and their physical infrastructure to expose potential security weaknesses and vulnerabilities.

Your contributions and suggestions are heartily♥ welcome. (✿◕‿◕). Please check the Contributing Guidelines for more details. This work is licensed under a Creative Commons Attribution 4.0 International License.

This project is supported by Netsparker Web Application Security Scanner

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 28, 2024 16:41
Conventional Commits Cheatsheet

Conventional Commit Messages starline

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

Tip

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

Commit Message Formats

Default

@carlosgruiz-dev
carlosgruiz-dev / Bookmarks.markdown
Last active December 10, 2024 00:21
Bookmarks

A

  • A bit of Vim - a book which aims to help you to learn how to use the Vim editor.
  • A.W.E.S.O.M. O - The really big list of really interesting open source projects.
  • AMP Project - The project enables the creation of websites and ads that are consistently fast, beautiful and high-performing across devices and distribution platforms.
  • APE - Angular JS REST Client.
  • ASCII Art - Real-Time ASCII Art Rendering Library
  • AST Explorer - A web tool to explore the ASTs generated by various parsers.
  • Advanced Bash-Scripting Guide - An in-depth exploration of the art of shell scripting by Mendel Cooper.
  • Advent of Code - is a series of small programming puzzles for a variety of skill levels.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by