Skip to content

Instantly share code, notes, and snippets.

View exceptionplayer's full-sized avatar
🦊
come on!

Danny W. exceptionplayer

🦊
come on!
  • HongKong
  • 23:41 (UTC +08:00)
View GitHub Profile
public class Test{
public void test(){}
}
@exceptionplayer
exceptionplayer / 0_reuse_code.js
Created April 16, 2016 06:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@exceptionplayer
exceptionplayer / todo.md
Last active April 16, 2016 07:13
TODO List test
  • Pick the flowers
  • Call John 9303032332
  • Cancel cable subscription
  • Book the flight tickets
@exceptionplayer
exceptionplayer / NULL.java
Last active April 16, 2016 10:03
Java容易迷惑的代码
public class NULL {
public static void haha() {
System.out.println("haha");
}
public static void main(String[] args) {
((NULL)null).haha();
}
}
@exceptionplayer
exceptionplayer / HelloCovariance.java
Created June 8, 2016 08:13 — forked from AlainODea/HelloCovariance.java
Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
public class HelloConvariance {
public static void main(String[] args) {
ConcurrentHashMap<String, String> properties = new ConcurrentHashMap<>();
Set<String> keySet = properties.keySet();
}
}
@exceptionplayer
exceptionplayer / gitignore
Created October 11, 2016 07:04
git ignore文件模板
#复制命名为.gitignore
.err
.iml
.log
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
@exceptionplayer
exceptionplayer / gist:7b8c4f0a010eaa4a7183c3181ba8d621
Created October 14, 2016 06:55 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@exceptionplayer
exceptionplayer / gist:e3481c7335a30e95491ed92bcdd5e000
Created April 6, 2017 02:25 — forked from jcarlosgarcia/gist:1621770
Set system properties via Spring XML configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<bean id="systemProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
@exceptionplayer
exceptionplayer / sync-gitlab-projects
Last active March 24, 2023 02:42 — forked from JonasGroeger/sync-projects
Gitlab: Clone / Pull all projects in a group in gitlab(批量下载gitlab中的项目)
#!/usr/bin/env bash
# should install jq first, for mac:brew install jq
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="your group name in gitlab"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""