Skip to content

Instantly share code, notes, and snippets.

View caiojhonny's full-sized avatar
~ ▋

Caio Jhonny caiojhonny

~ ▋
View GitHub Profile
@bashbunni
bashbunni / .zshrc
Created October 27, 2022 21:41
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@diego3g
diego3g / settings.json
Last active May 3, 2024 14:09
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@n5i
n5i / gist:91b11078a056b08505f9fb8fd0736742
Created October 30, 2018 21:31
Docker ps shows ID and Names only
docker ps --format "table {{.ID}}\t{{.Names}}"
@RatoX
RatoX / tmux.conf
Created September 13, 2018 02:39
Integrate TMUX with Google Calendar using gcalcli
# First you need to install gcalcli please go to https://github.com/insanum/gcalcli
wg_next_event="#(gcalcli --military --nostarted agenda --nocolor | cut -d ' ' -f 2- | head -2 | tail -1 | cut -c1-40)"
set -g status-right "#[fg=colour15,bg=colour237,bold]📅 $wg_next_event"
@messi89
messi89 / \Laravel\Passport\Http\Controllers\AccessTokenController
Last active August 25, 2023 12:33
Laravel Passport - Customize The Token Response
<?php
/**
* Laravel Passport - Customize Token response.
*
* @author Messi89 OVERGEN <@messi89minou>
* @link https://github.com/messi89
*/
namespace App\Http\Controllers\Api;
use App\Models\User;
@arubacao
arubacao / latlong.php
Last active February 10, 2024 00:55
Latitude Longitude Regular Expression Validation PHP
<?php
/**
* Validates a given latitude $lat
*
* @param float|int|string $lat Latitude
* @return bool `true` if $lat is valid, `false` if not
*/
function validateLatitude($lat) {
return preg_match('/^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$/', $lat);
@erichrobinson
erichrobinson / README.md
Last active February 24, 2024 08:32
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
@mariozig
mariozig / migrate_repo.sh
Last active December 22, 2022 08:32
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@ksol
ksol / chrome_39.js
Last active July 10, 2021 13:37
Language detection in javascript
window.navigator.language // -> "fr"
window.navigator.languages // -> ["fr-FR", "fr", "en-US", "en", "es", "de"]
window.navigator.userLanguage // -> undefined
window.navigator.browserLanguage // -> undefined
window.navigator.systemLanguage // -> undefined
@fieldoffice
fieldoffice / sass-transforms
Last active September 27, 2022 17:32
Sass Transform Mixins
// Browser Prefixes
@mixin transform($transforms) {
-webkit-transform: $transforms;
-moz-transform: $transforms;
-ms-transform: $transforms;
transform: $transforms;
}
// Rotate
@mixin rotate ($deg) {