Skip to content

Instantly share code, notes, and snippets.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 19, 2024 18:11
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@chaodonghu
chaodonghu / unfollow-everyone-instagram.js
Last active April 19, 2024 18:10
Google Chrome script that allows user to mass unfollow instagram users on user's profile
// Run GOOGLE CHROME - WORKING AS OF DEC 26 2023
// Please @ me in the comments if this stops working, I will try to get it working again within the month
// INSTRUCTIONS
// 1. Open Instagram in Chrome
// 2. Click on "FOLLOWING" on your Instagram profile
// 3. Open developer tools by right clicking on the page and clicking "INSPECT"
// 4. Copy the code below and paste in the developer tools console and press enter to run
// 5. Script will not run if tab is navigated away from, minimized of unfocused (It is recommended to open a new chrome window or push tab to the side and let script run in background)
@letanure
letanure / estados-cidades.json
Last active April 19, 2024 18:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@nickmarty
nickmarty / recover_email_password.lua
Created February 12, 2021 22:35
Nakama Email Password Recovery
--[[
Email Password Recovery module.
Using this module, you can request a password reset link from the game using 'recover_email_password' RPC.
--]]
local nk = require("nakama")
local HTTPS_PREFIX = "https://"
local MAILGUN_API_BASE_URL = "api.mailgun.net/v3"
@demirdegerli
demirdegerli / ubuntu_debloater.sh
Last active April 19, 2024 18:07
Ubuntu Debloater
#!/bin/sh
if [ "$(whoami)" != "root" ]; then
echo "Please run this script as root."
exit
fi
printf "This script will\n\n- Remove Snap\n- Install the deb version of Firefox\n- Install Flatpak\n- Optionally replace Ubuntu Desktop with GNOME\n\n"
read -p "Continue? (Y/n) " start_prompt
case $start_prompt in
[nN] | [nN][oO] )
exit
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@gsuberland
gsuberland / MoveDisplays.cs
Created November 25, 2021 04:08
Move displays programmatically on Windows in C#
// quick bit of code to move displays to specific locations in C#
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct DEVMODE
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
@wojteklu
wojteklu / clean_code.md
Last active April 19, 2024 18:00
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@dhh
dhh / linux-setup.sh
Last active April 19, 2024 17:57
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@devfraga
devfraga / readme.md
Last active April 19, 2024 17:55
README para os projetos pessoais

Logo do projeto

Nome do Projeto

Uma breve descrição do projeto aqui.

🔥 Introdução

Coloque aqui as instruções e quais são os objetivos desse projeto, funcionalidades.