Skip to content

Instantly share code, notes, and snippets.

View pgbezerra's full-sized avatar
🎯
Focusing

Bezerra pgbezerra

🎯
Focusing
View GitHub Profile
@pgbezerra
pgbezerra / merged_prs.py
Created March 9, 2022 22:22
Write in a CSV repo, merged date, author and authors organization team
import csv
import os
import requests
import sys
from gql import Client, gql
from gql.transport.aiohttp import AIOHTTPTransport
from requests.auth import HTTPBasicAuth
org = sys.argv[1]
repo = sys.argv[2]
@pgbezerra
pgbezerra / migrate_git_remote.sh
Created December 2, 2020 20:56
Migrate git remote to a new one
YOUR_NEW_REPO="TYPE YOUR NEW REPO"
git remote rename origin old
git remote add origin $YOUR_NEW_REPO
for branch_old in $(git branch -rvvv | awk '/old/ {print $1}'); do
branch=$(echo $branch_old | sed 's/old\///g')
echo git checkout -b tmp $branch_old
echo git push origin tmp:$branch
@pgbezerra
pgbezerra / DataTables.php
Created September 5, 2017 18:47
PHP Datatables proxy to SQLServer
<?php
namespace DataTables;
use PDO;
use PDOException;
use Exception;
/*
* This script it is originated by datatables official exampla and has been
@pgbezerra
pgbezerra / mongod.service
Last active April 9, 2020 02:54
Systemd mongod mongos scripts
[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target
After=network.target
[Service]
User=mongodb
Group=mongodb
Type=forking
RuntimeDirectory=mongodb