Skip to content

Instantly share code, notes, and snippets.

Avatar

Filipe Freire filfreire

View GitHub Profile
@bvaughn
bvaughn / react-dom-test-selectors.md
Last active Jan 9, 2023
Experimental React DOM test selector API
View react-dom-test-selectors.md

RFC Test Selectors

Owner: Brian Vaughn


As of facebook/react/pull/22760, the experimental Test Selector API is now available in the experimental release channel.

To test the API, first install the experimental release:

@gimenete
gimenete / readme.md
Last active Jun 17, 2020
Notas para orientación profesional como programador
View readme.md

Tras este tweet que publiqué

He sido freelance, emprendedor y trabajo desde hace años para empresas USA de diversos tamaños en remoto como programador fullstack. Ahora en GitHub. Si puedo ayudar a alguien en orientar su carrera, mis DMs están abiertos. Ask me anything.

he recibido muchos mensajes y escribo aquí algunos de los consejos que he dado en resumen. Nota: algunas cosas son concretas de trabajar en España. Si vas a trabajar desde Sudamérica sólo una nota: tienes la ventaja de la zona horaria para trabajar con EEUU.

Inglés

Tener un buen nivel de inglés es fundamental para poder trabajar con clientes extranjeros. El conocimiento del idioma tiene que mantenerse en el tiempo. Es como mantenerse en forma física; si lo dejas, lo pierdes. Personalmente aunque trabajo 100% en inglés desde hace bastantes años, intento crearme un entorno diario con el idioma para no perderlo:

@Adriem
Adriem / update-hosts.js
Last active Nov 19, 2018
Simple script for updating the /etc/hosts file
View update-hosts.js
#!/usr/bin/env node
/** @author Adrian Moreno (https://github.com/adriem) */
const https = require('https')
const fs = require('fs')
const urls = process.argv.slice(2).filter(arg => arg !== '-v' && arg !== '--verbose')
const verbose = process.argv.includes('-v') || process.argv.includes('--verbose')
View csv_parser_email_sender.rb
#!/usr/bin/ruby
require 'csv'
require 'mail'
# PATH's configuration
base_path = '/Users/rafaelalmeida/Downloads'
pdf_base_path = '/Users/rafaelalmeida/Downloads/certificados-pdf'
# SMTP configuration
@a7ul
a7ul / jamf.md
Last active Jan 21, 2023
removing all restrictions on jamf managed macos device - Provided you have root access.
View jamf.md

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

@Saissaken
Saissaken / Update git fork with tags.sh
Last active Jan 18, 2023
Update git fork with tags
View Update git fork with tags.sh
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active Jan 25, 2023
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View redis_cheatsheet.bash
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@Darep
Darep / no-comments.js
Created May 30, 2016
Remove all comments from GitHub Pull Request
View no-comments.js
// Sometimes it's necessary to do a bit of clean-up
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) {
el.removeAttribute('data-confirm');
el.click();
});
@tim545
tim545 / zerowidthspace.md
Last active Aug 11, 2019
The most evil character in Unicode
View zerowidthspace.md

'Zero Width Space' character

I had some trouble with this character in a client project, it was hidden inside a configuration string which is validated in the clients API. It's basically invisible, literally a space character with zero width, it could not be seen but it was breaking at the API because it would not validate, causing problems with hundreds of user accounts.

The Unicode value of this character is U+200B, and it's evil, very evil. Lying in wait to break your applications while leaving no sign of it's presence...

It also has some friends, check the answer of this Stack Overflow question

In my project, it was one of my colleuges who managed to find the character, he re-copied the string into the code and Git showed that the line had been changed, even though all the Git GUI's didn't actually show any difference. He ran git diff in the command line and this did show the Unicode character being deleted, that's somet

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname