Skip to content

Instantly share code, notes, and snippets.

View shalk's full-sized avatar
🎯
Focusing

shalk(xiao kun) shalk

🎯
Focusing
View GitHub Profile
@shalk
shalk / redis.sh
Created January 21, 2022 06:56
本地启动redis
docker run --name some-redis -p 6379:6379 -d redis redis-server --requirepass 123123
@shalk
shalk / MyCacheWrapper.java
Created March 8, 2021 11:12
MyCacheWrapper
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Date;
import java.util.HashMap;
/**
* doc.
*
@shalk
shalk / git-clone-helper.pl
Last active October 12, 2019 06:59
when clone git repo from http or git protocol ,it will create directory in user_home; egg: git-clone-helper.pl https://github.com/github/fetch , clone into directory /home/me/code/github.com/github/fetch
#!/usr/bin/env perl
use feature qw(say);
$num_args = $#ARGV + 1;
if ($num_args < 1) {
print "usage: git-clone url" ;
exit
}
$addr = $ARGV[0];

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@shalk
shalk / gist:591c02f5db3bd01eb8434a0859800bf1
Created May 23, 2019 08:34
fix ubuntu 18.04 network limited to 10Mb
ethtool -s enp0s31f6 speed 100 duplex full
@shalk
shalk / xmind.desktop
Created May 9, 2019 02:56
/usr/share/applications/xmind.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=XMind
Path=/opt/xmind-8u8/XMind_amd64
Exec=/opt/xmind-8u8/XMind_amd64/XMind
Icon=/opt/xmind-8u8/XMind_amd64/xmind.256.png
Categooptries=Appu8lication
Terminal=false
//import org.apache.http.conn.ssl.SSLSocketFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class Test {
public static void main(String[] args) throws Exception {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, null, null);
@shalk
shalk / Coin.java
Last active March 25, 2019 10:12
Coin4j
import java.util.Random;
import java.util.concurrent.TimeUnit;
public class Coin {
public static void main(String[] args) throws InterruptedException {
String[] candidates = new String[]{"🌝", "🌖", "🌗", "🌘", "🌚", "🌒", "🌓", "🌔"};
Random r = new Random();
for (int i = 0; i < 3; i++) {
for (String s : candidates) {
System.out.print(s);
sudo rm -rf ~/.cache/ibus/libpinyin/
sudo ibus-daemon --restart