Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

shalk(xiao kun) shalk

🎯
Focusing
View GitHub Profile
@shalk
shalk / redis.sh
Created Jan 21, 2022
本地启动redis
View redis.sh
docker run --name some-redis -p 6379:6379 -d redis redis-server --requirepass 123123
View MyCacheWrapper.java
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 Oct 12, 2019
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
View git-clone-helper.pl
#!/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];
View 分布式系统学习资料.md

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


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

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

@shalk
shalk / gist:591c02f5db3bd01eb8434a0859800bf1
Created May 23, 2019
fix ubuntu 18.04 network limited to 10Mb
View gist:591c02f5db3bd01eb8434a0859800bf1
ethtool -s enp0s31f6 speed 100 duplex full
@shalk
shalk / xmind.desktop
Created May 9, 2019
/usr/share/applications/xmind.desktop
View 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
View Test.java
//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);
View Coin.java
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);
View gist:1b93c22f3a9f362e38ffc76510fad6fe
sudo rm -rf ~/.cache/ibus/libpinyin/
sudo ibus-daemon --restart