Skip to content

Instantly share code, notes, and snippets.

View ninjachen's full-sized avatar
🥝
Food makes me happy

Ninja Chen ninjachen

🥝
Food makes me happy
  • Shanghai, China
View GitHub Profile
@ninjachen
ninjachen / Hashmap.java
Created September 15, 2024 14:31
hand write hashmap
class MyHashMap {
static class Node {
public int key;
public int value;
public Node prev;
public Node next;
}
static Node first;
static Node last;
@ninjachen
ninjachen / MurmurHash
Created October 13, 2021 11:48
Murmur hash 3.0
package rocks.ninjachen;
/**
* Murmur hash 3.0.
* <p>
* It works as the same as lastguest\Murmur in PHP in limited test data.
*/
public final class MurmurHash {
/**
* @param key Text to hash.
@ninjachen
ninjachen / gitconfig
Created May 22, 2020 08:50
put this file under ~/.gitconfig
[alias]
co = checkout
br = branch
ci = commit
st = status -uno
mylog = !git log --author=\"$(git config user.name)\"
viewchanges= diff -v --stat --cached origin/master
[user]
name = Jiachen Ning
email = jiachenning@gmail.com
{
"basics": {
"name": "JiachenNing",
"label": "Java Software Engineer",
"picture": "https://avatars3.githubusercontent.com/u/3176871?s=460&v=4",
"email": "jiachenning@gmail.com",
"phone": "(86) 15800800838",
"website": "https://rnd.app",
"summary": "A broad-skill dev with seven year experience in analysis, design, implementation, testing. Be proficient with Java, Android",
"location": {
@ninjachen
ninjachen / resume_cn.json
Last active December 2, 2019 05:27
resume_cn.json
{
"basics": {
"name": "宁佳晨",
"label": "Java工程师",
"picture": "https://avatars3.githubusercontent.com/u/3176871?s=460&v=4",
"email": "jiachenning@gmail.com",
"phone": "(86) 15800800838",
"website": "https://rnd.app",
"summary": "一名技能广泛的程序员,从业7年,动手能力较强,熟悉JavaEE,Android,PHP领域.",
"location": {
@ninjachen
ninjachen / resume.json
Last active January 7, 2021 18:18
A useful resume
{
"basics": {
"name": "宁佳晨",
"label": "Java工程师or大数据工程师",
"picture": "https://avatars3.githubusercontent.com/u/3176871?s=460&v=4",
"email": "jiachenning@gmail.com",
"phone": "(86) 15800800838",
"website": "",
"summary": "一名技能广泛的程序员,从业8年,动手能力较强,熟悉JavaEE,大数据,Android领域。",
"location": {
#x = 1
#if x == 1:
# print("x is 1.")
#print("new line")
#words = ['one', 'two', 'three']
#for w in words:
# print(w, len(w))
# Calculate x^3+y^3+z^3=33
@ninjachen
ninjachen / install_vim_8.0.md
Last active November 3, 2018 11:22
Build and install vim 8.0 and
@ninjachen
ninjachen / InstallZshOnCentOS.md
Last active August 20, 2018 05:42 — forked from rkaneko/InstallZshOnCentOS.md
Installing zsh on CentOS

Installing zsh on CentOS

$ sudo yum install ncurses-devel

$ cd /usr/local/src

$ sudo curl -L https://sourceforge.net/projects/zsh/files/zsh/5.5.1/zsh-5.5.1.tar.gz/download -o zsh-5.5.1.tar.gz

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_http