This file contains 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
_ ん | |
] 」 | |
[ 「 | |
? ? | |
; っ | |
: : | |
zc ざ | |
zd ぜん | |
zf ぜ | |
zn ざん |
This file contains 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
Usage | |
- clone this | |
- ./initrepo foo.git | |
- ./easygit.rb | |
- git clone http://localhost:8080/foo.git |
This file contains 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
/* mysql -u root */ | |
SET GLOBAL log_output=FILE; | |
SET GLOBAL general_log=ON; | |
show variables like 'general_log%'; | |
/* | |
+------------------+------------------------------+ | |
| Variable_name | Value | |
This file contains 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
#include <chrono> | |
#include <iostream> | |
auto start = std::chrono::high_resolution_clock::now(); | |
// do something | |
auto end = std::chrono::high_resolution_clock::now(); | |
std::cout << std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << std::endl; |
This file contains 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
class Bean { | |
@JsonDeserialize(using=RrDeserializer.class) | |
public final Object rr; | |
public static class RrDeserializer extends JsonDeserializer<Object> implements ResolvableDeserializer { | |
JsonDeserializer<Object> sampleRefResponseDeserializer; | |
@Override | |
public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { | |
JsonToken token = jp.getCurrentToken(); |
This file contains 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
import time | |
import itertools | |
import gc | |
gc.disable() | |
start = time.time() | |
for i in itertools.repeat(None, 10000): | |
# do something |
This file contains 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
times = 1000000; | |
console.time('global'); | |
for (i = 0; i < times; ++i) { | |
// do something | |
} | |
console.timeEnd('global'); |
This file contains 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.example.android; | |
import org.junit.runners.model.InitializationError; | |
import org.robolectric.AndroidManifest; | |
import org.robolectric.RobolectricTestRunner; | |
import org.robolectric.res.DrawableNode; | |
import org.robolectric.res.OverlayResourceLoader; | |
import org.robolectric.res.PackageResourceLoader; | |
import org.robolectric.res.ResName; | |
import org.robolectric.res.ResourceLoader; |
This file contains 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
function pp () { | |
export PREVIOUS_PP_ARGS="$*" | |
pgrep -lfa $* | |
} | |
function pk () { | |
if [ $# -eq 0 ]; then | |
pgrep -lf $PREVIOUS_PP_ARGS | awk '{print $1}' | xargs kill | |
else | |
pgrep -lf $PREVIOUS_PP_ARGS | sed "$1q;d" | awk '{print $1}' | xargs kill |
This file contains 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
au BufWinEnter COMMIT_EDITMSG setlocal tw=75 | |
au BufWinEnter COMMIT_EDITMSG let w:g1=matchadd('ErrorMsg', '\%1l\%51v.\+', -1) | |
au BufWinEnter COMMIT_EDITMSG let w:g2=matchadd('ErrorMsg', '\%76v.\+', -1) | |
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%80v.\+', -1) | |