Skip to content

Instantly share code, notes, and snippets.

View brunocribeiro's full-sized avatar

Bruno Ribeiro brunocribeiro

View GitHub Profile
@joseluisq
joseluisq / stash_dropped.md
Last active July 16, 2024 11:38
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.

@renanccastro
renanccastro / slack_delete_all_files.py
Last active July 23, 2016 17:30
deletando files próprios
from slacker import Slacker
# primeiro, instale com: pip install slacker
# deleta todos os arquivos
token = 'gere seu token em: https://api.slack.com/docs/oauth-test-tokens'
name = 'renan.castro'
slack = Slacker(token)
# Get users list
@kontext-e
kontext-e / ParameterNameGenerator
Last active December 5, 2019 12:33
Plugin for IntelliJ LivePlugin; adds a new intention for generating call parameters based on the parameters of the called method
// Usage:
// Install LivePlugin http://plugins.jetbrains.com/plugin/7282
// Install this plugin into LivePlugin and run it
// In source code, create a method or constructor call and place the cursor into the empty braces
// Open the intentions drop down menu and select the "Create variables for method call parameters"
import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.Document
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiCallExpression
@jagtesh
jagtesh / split_tunneling.md
Created May 7, 2013 09:06
Split Tunneling tutorial - with openconnect (tested, works with Cisco AnyConnect VPN) Source: http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2009-February/002990.html

Table of Contents

  1. DISCLAIMER 2. Status 3. Introduction 4. Security issues 5. DNS
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@criminy
criminy / AbstractJdbcRepository.java
Created September 9, 2011 16:43
Implementation of PagingAndSortingRepository using JdbcTemplate
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;