This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --force --index-filter \ | |
'git rm --cached --ignore-unmatch myFile' \ | |
--prune-empty --tag-name-filter cat -- --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum MyEnum { | |
GOOD("GOOD"); | |
private String value; | |
public enum MyEnum(String value){ | |
this.value = value; | |
} | |
@Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.david; | |
import org.junit.Assert; | |
import java.util.Stack; | |
public class Solution { | |
private static String one = "[]"; | |
private static String two = "[[]]"; | |
private static String three = "[][]"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $SSH_CONNECTION | cut -f 1 -d " " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.print(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var u=document.location.protocol+"//"+document.location.host+"/CreateIssueDetails!init.jspa?",onTemplatePage=null!=document.getElementById("issue-create");if(onTemplatePage)for(var x=document.getElementById("issue-create").querySelectorAll("input,select,textarea"),i=0;i<x.length;i++)x[i].value&&(x[i].name&&x[i].name.indexOf("customfield_10151")<0||x[i].id&&x[i].id.indexOf("customfield_10151")<0)&&(u=u+(x[i].name?x[i].name:x[i].id)+"="+encodeURIComponent(x[i].value)+"&");else for(var x=document.getElementsByName("jiraform")[0].querySelectorAll("input,select,textarea"),i=0;i<x.length;i++)x[i].value&&(x[i].name&&x[i].name.indexOf("customfield_10151")<0||x[i].id&&x[i].id.indexOf("customfield_10151")<0)&&(u=u+(x[i].name?x[i].name:x[i].id)+"="+encodeURIComponent(x[i].value)+"&");document.body.insertAdjacentHTML("beforeend","<div id='x' style='word-wrap:break-word;display:inline;position:absolute;z-index:5000;left:30%;top:30%;padding:10px;width:40%;color:white;background-color:black;'>Copy this link:<br/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
gso = "!gitSwitchOrigin() { \ | |
if [[ \"$#\" -ne 1 ]]; then { echo \"Usage: git gso <newOrigin>\"; exit 1; } fi; \ | |
git remote add new_origin \"$1\"; \ | |
git remote remove origin; \ | |
git remote rename new_origin origin; \ | |
}; gitSwitchOrigin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
gitignore = "!gitignore(){ curl https://www.gitignore.io/api/$1; }; gitignore" | |
# Example usage: git gitignore node,intellij,macos > .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
gpa = !git remote | xargs -L1 git push --all |