Skip to content

Instantly share code, notes, and snippets.

View leocunhadev's full-sized avatar

Léo Cunha leocunhadev

View GitHub Profile
@leocunhadev
leocunhadev / stash_dropped.md
Last active October 26, 2021 02:12 — forked from joseluisq/stash_dropped.md
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@leocunhadev
leocunhadev / PowerShell.json
Last active May 26, 2020 23:55
Personalização do Power Shell do Windows
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"copyOnSelect": false,
"copyFormatting": false,
"profiles": {
"defaults": {
"cursorShape": "underscore"
},
"list": [
# Numerous always-ignore extensions
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.ini
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 2
charset = utf-8
@leocunhadev
leocunhadev / cidades-estados-01.json
Created March 31, 2020 23:04
Cidades e Estados Brasileiros
{
"states": {
"11": "Rondônia",
"12": "Acre",
"13": "Amazonas",
"14": "Roraima",
"15": "Pará",
"16": "Amapá",
"17": "Tocantins",
"21": "Maranhão",
jQuery(document).ready(function(){
$(window).scroll(function(e){
parallaxScroll();
});
function parallaxScroll(){
var scrolled = $(window).scrollTop();
$('#parallax-bg-1').css('top',(0-(scrolled*.10))+'px');
$('#parallax-bg-2').css('top',(0-(scrolled*.4))+'px');
$('#parallax-bg-3').css('top',(0-(scrolled*1))+'px');
// When the user scrolls the page, execute myFunction
window.onscroll = function() {myFunction()};
function myFunction() {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
var teste = document.querySelector('#teste');
document.getElementById("myBar").style.width = scrolled + "%";
if(scrolled >= 35){