Skip to content

Instantly share code, notes, and snippets.

View guilhermepontes's full-sized avatar
🪁

Guilherme Pontes guilhermepontes

🪁
  • PVH Corp.
  • Amsterdam
  • 06:19 (UTC +02:00)
View GitHub Profile
@guilhermepontes
guilhermepontes / 1-setup.md
Created February 13, 2023 09:02 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

[
{
"name": "Composer",
"ring": "adopt",
"quadrant": "tools",
"isNew": "TRUE",
"description": "Although the idea of dependency management ..."
},
{
"name": "Canary builds",
@guilhermepontes
guilhermepontes / script.js
Last active April 7, 2022 12:00
Remove promoted jobs LinkedIn
(() => {
let i = 0;
let d = document;
let t = 1000;
let results = '.jobs-search-results__list';
let item = '.jobs-search-results__list-item';
let footer = '.job-card-container__footer-item';
let get = (s) => d.querySelector(s);
@guilhermepontes
guilhermepontes / type.ts
Created January 14, 2020 10:20
Immutable type
type Immutable<T> = {
readonly [K in keyof T]: Immutable<T[K]>;
};
function httpAction(action) {
const httpActionTemplate = {
type: "",
endpoint: null,
verb: "GET",
payload: null,
headers: [],
}
return {
@guilhermepontes
guilhermepontes / stack.js
Created November 30, 2018 10:01
stack data structure
function createStack() {
const stack = [];
return {
push(item) {
stack.push(item)
},
pop() {
return stack.pop()
@guilhermepontes
guilhermepontes / priorityQueue.js
Last active December 18, 2019 11:43
queue data structure, javascript
function createPriorityQueue() {
const highPriorityQueue = createQueue()
const lowPriorityQueue = createQueue()
return {
enqueue(item, isHighPriority = false) {
(isHighPriority
? highPriorityQueue
: lowPriorityQueue
).enqueue(item)
@guilhermepontes
guilhermepontes / sass-mixin-font-face.scss
Created June 5, 2018 13:45 — forked from oddscenes/sass-mixin-font-face.scss
Sass mixin for including fonts for font-face
@mixin font-face($font-name, $file-name, $weight: normal, $style: normal) {
@font-face {
font-family: quote($font-name);
src: url($file-name + '.eot');
src: url($file-name + '.eot?#iefix') format('embedded-opentype'),
url($file-name + '.woff') format('woff'),
url($file-name + '.ttf') format('truetype'),
url($file-name + '.svg##{$font-name}') format('svg');
font-weight: $weight;
font-style: $style;
@guilhermepontes
guilhermepontes / test.tsx
Last active April 25, 2018 21:24
Use generics to set the state in React | Typescript
import React from 'react';
interface State = {
name: string;
age: number;
alive: boolean;
}
class App extends PureComponent<{}, State> {
public state = {

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname