Skip to content

Instantly share code, notes, and snippets.

View xbrunosousa's full-sized avatar
🏠

Bruno Sousa xbrunosousa

🏠
  • Brasília, Brazil.
View GitHub Profile
@divspace
divspace / enable-touch-id-fingerprint-sudo-iterm-terminal-macos.md
Last active August 31, 2023 00:47
Enable Touch ID Fingerprint For `sudo` in iTerm and Terminal (macOS)

Open your sudo file:

sudo vi /etc/pam.d/sudo

Add the following after the first line:

auth sufficient pam_tid.so
@cesarhilario
cesarhilario / playlist_time.js
Last active November 21, 2023 14:31 — forked from fredericogg/playlist_time.js
Calcula o tempo total de uma playlist no Youtube. É só colar no console na página da playlist. Update para a nova interface do Youtube
(function () {
const timeContainer = document.querySelectorAll(
".ytd-thumbnail-overlay-time-status-renderer"
);
let timeSeconds = 0;
for (let i = 0; i < timeContainer.length; i++) {
const timeStr = timeContainer[i].innerText;
if (!/\d?\d:\d{2}(:\d{2})?/g.test(timeStr)) continue;
const timeParts = timeStr.split(":");
@gdomiciano
gdomiciano / .gitlab-ci.yml
Last active December 20, 2018 17:57
GitLab CI configuration for Nuxt.js Deployment
# Passos que o seu Servidor de CI deverá seguir (test/build/deploy)
stages:
- deploy
# nome da tarefa do CI
deploy_prod:
# Passo a que esta tarefa pertence
stage: deploy
# definição de comandos necessários para essa tarefa
script:
@guilhermebruzzi
guilhermebruzzi / github-net-config.md
Last active May 22, 2023 17:02
NET não libera a porta 22 e impede de acessar o github por ssh

Usar ssh do github com wifi do netcombo

A NET parece que só libera o uso de qualquer porta, como a porta 22 de ssh, para pessoa jurídica em seus novos planos (desde 2016).

Para conseguir usar o github por ssh com plano de internet da NET para pessoa física, é necessário:

Criar o arquivo ~/.ssh/config e adicionar:

Host github.com
@micc83
micc83 / mysqldump.php
Created June 5, 2017 13:17
Simple PHP script to dump a MySql database
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$database = 'db';
$user = 'user';
$pass = 'pass';
$host = 'localhost';
@ankurk91
ankurk91 / github_gpg_key.md
Last active June 7, 2024 14:31
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@mgmilcher
mgmilcher / gist:5eaed7714d031a12ed97
Last active March 28, 2023 14:53
Nginx, PHP-FPM, MySQL and phpMyAdmin on OS X

This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.

This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)

Xcode

Make sure you have the latest version of XCode installed. Available from the Mac App Store.

Install the Xcode Command Line Tools:

xcode-select --install

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 17, 2024 13:07
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k