Skip to content

Instantly share code, notes, and snippets.

View call0fcode's full-sized avatar
:octocat:
Working from home

Juan Gómez Carrillo call0fcode

:octocat:
Working from home
View GitHub Profile
@mikamboo
mikamboo / README.md
Last active July 25, 2024 22:33
JS : Display image in browser console

Function to display image in js console

Source : https://stackoverflow.com/a/47177899

console.image = function(url, size = 100) {
  const image = new Image();
  image.src = url;
  image.onload = function() {
 var style = [
@dhonx
dhonx / update_branch_list_from_remote.sh
Created November 8, 2019 07:08
Git: Update Branch List from Remote
# Source: https://stackoverflow.com/questions/36358265/when-does-git-refresh-the-list-of-remote-branches
# To update the local list of remote branches:
git remote update origin --prune
@sajithneyo
sajithneyo / bracket-pair-colorizer-2-settings
Created June 25, 2019 14:23
Settings you need for bracket pair colorizer 2
{
"bracket-pair-colorizer-2.colors": [
"Gold",
"Orchid",
"LightSkyBlue",
"Salmon",
"LawnGreen",
"DarkOrange",
"Cornsilk"
],
@babakness
babakness / disable-back-gesture-on-mac-by-browser.md
Last active February 20, 2024 19:17
A list of commands to disable the back gesture for Chrome, FireFox, Brave, and Safari

When working with online editor, the back gesture on a Mac can become very frustrating. Here are some helpful commands disable the back gesture:

# Disable back gesture in specific apps

# Chrome
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE
# FireFox
defaults write org.mozilla.firefox AppleEnableSwipeNavigateWithScrolls -bool FALSE
# Brave
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 28, 2024 20:33
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@adrianjost
adrianjost / tic_tac_toe.js
Last active July 22, 2024 15:04
JS console.log() Tic-Tac-Toe Game
/*
* Created by Adrian Jost
* Feel free to use, but please credit me
*
* Start the game by calling `ttt()`
*/
function drawBoard(round, board){
console.group(`Score after round ${round}`);
console.log(" ");
console.log(' ' + (board["7"] || '7 ') + " | " + (board["8"] || ' 8 ') + " | " + (board["9"] || ' 9 '));
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 28, 2024 04:01
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE