Skip to content

Instantly share code, notes, and snippets.

View phsantiago32's full-sized avatar

Pedro Santiago phsantiago32

View GitHub Profile
@giggio
giggio / Add Windows Terminal Open here.reg
Created February 12, 2021 17:00
This adds Context menus for directories and directories background to open in Windows Terminal
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\WT]
@="Open Windows Terminal here"
"Icon"="C:\\p\\terminal\\src\\cascadia\\CascadiaPackage\\bin\\x64\\Release\\AppX\\WindowsTerminal.exe"
[HKEY_CLASSES_ROOT\Directory\shell\WT\command]
@="wtd.exe -w 1 new-tab -d \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\WTU]
@rponte
rponte / using-uuid-as-pk.md
Last active May 9, 2024 18:51
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@alirezamika
alirezamika / autoscraper-examples.md
Last active May 6, 2024 19:04
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@vxhviet
vxhviet / simplifiedGitFlow.md
Last active August 11, 2023 18:31
A simplified version of Git Flow

Simplified Git-flow

                        RELEASE TAG
o----------------------------o-----------------o------------o------> MASTER
 \                          /  \                \----------/ HOTFIX
  \                        /    \                          \
   \----------------------/      \--------------------o-----o------> DEVELOP
                                  \                  /
 \----------------/ FEATURE
@DanielSWolf
DanielSWolf / Program.cs
Last active May 2, 2024 18:33
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@potter0815
potter0815 / cloneall.sh
Last active January 30, 2024 13:07
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"
@iwek
iwek / tsv-to-json.js
Last active March 20, 2023 02:46
TSV to JSON Conversion in JavaScript
//var tsv is the TSV file with headers
function tsvJSON(tsv){
var lines=tsv.split("\n");
var result = [];
var headers=lines[0].split("\t");
for(var i=1;i<lines.length;i++){
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"