Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

千橙 iqiancheng

🌴
On vacation
View GitHub Profile
View geektime-enhance.user.js
// ==UserScript==
// @name 让极客时间的内容可以复制!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 让极客时间的内容可以复制!
// @author qiancheng
// @include *//time.geekbang.org/*
// @grant none
// @require http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js
// ==/UserScript==
@iqiancheng
iqiancheng / onlinevideoconverter.user.js
Created Sep 16, 2018
Youtube Download Online Video Converter
View onlinevideoconverter.user.js
// ==UserScript==
// @name Youtube Download Online Video Converter
// @namespace https://www.onlinevideoconverter.com/
// @version 1.2.2
// @description This userscript assists OnlineVideoConverter to convert video links.
// @copyright 2017, OnlineVideoConverter.com
// @icon https://www.onlinevideoconverter.com/assets/images/ovc-icon.png
// @icon64 https://www.onlinevideoconverter.com/assets/images/ovc-icon64.png
// @homepage https://www.onlinevideoconverter.com/extension
// @downloadURL https://www.onlinevideoconverter.com/assets/javascript/ovc.user.js
View PingPongChannelInitializer.java
package example;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import io.netty.handler.codec.LengthFieldPrepender;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import io.netty.util.CharsetUtil;
@iqiancheng
iqiancheng / osx_mysql_ownership_fix
Created Mar 20, 2017 — forked from mogetutu/osx_mysql_ownership_fix
'warning the user/local/mysql/data directory is not owned by the mysql user', you have to:
View osx_mysql_ownership_fix
sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
sudo /usr/local/mysql/support-files/mysql.server start
View kratos
Κράτος (Kratos) 克拉托斯 力量之神。
View .gitignore_global
# Created by .ignore support plugin (hsz.mobi)
### Vim template
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# session
Session.vim
# temporary
.netrwhist
*~
@iqiancheng
iqiancheng / show-busy-java-threads.sh
Created Sep 5, 2016
快速查看占用CPU前五的java线程栈
View show-busy-java-threads.sh
#!/bin/bash
# @Function
# Find out the highest cpu consumed threads of java, and print the stack of these threads.
#
# @Usage
# $ ./show-busy-java-threads.sh
#
# @author Jerry Lee
readonly PROG=`basename $0`
@iqiancheng
iqiancheng / Main.java
Created Aug 18, 2016 — forked from gnosis23/Main.java
Mybatis Generator Maven plugin
View Main.java
package app;
import dao.HeroUserMapper;
import entity.HeroUser;
import entity.HeroUserExample;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created with IntelliJ IDEA.
@iqiancheng
iqiancheng / git.md
Created Jul 8, 2016 — forked from suziewong/git.md
Git的多账号如何处理? 1.同一台电脑多个git(不同网站的)账号 2.同一台电脑多个git(同一个网站的比如github的)多个账号
View git.md

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22
host gitlab.zjut.com
View gist:715c30b409943c673649406a1c0c011b
package com.foocoders.text;
import java.text.AttributedCharacterIterator;
import java.text.DateFormatSymbols;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;