Skip to content

Instantly share code, notes, and snippets.

View lixingcong's full-sized avatar
😂
Face With Tears of Joy...

Lixingcong lixingcong

😂
Face With Tears of Joy...
View GitHub Profile
@lixingcong
lixingcong / Employee.java
Last active June 5, 2016 02:45
java.io.Serializable Sample
package seq;
public class Employee {
public String name;
public int age;
}
@lixingcong
lixingcong / Makefile.partial
Last active August 7, 2016 03:34
Redirect std stream to USARTx for STM32F103 device
# toolchain: gcc-arm-none-eabi(Linux), pleas use newlib_stubs.c
OBJS += newlib_stubs.o
CFLAGS += -ffunction-sections -fdata-sections -fno-builtin
LDFLAGS += --specs=nano.specs -lc -lnosys
# toolchain: keil MDK(Windows), please use redirect_file_stream.c
# Please check 'USE MicroLIB'
@lixingcong
lixingcong / sample-google.c
Created September 10, 2016 08:43 — forked from davidzchen/sample-google.c
Sample C code using the Google C++ style guide
// Sample file using the Google C++ coding standard.
//
// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
//
// General rules:
// - Indents are two spaces. No tabs should be used anywhere.
// - Each line must be at most 80 characters long.
// - Comments can be // or /* but // is most commonly used.
// - File names should be lower_case.c or lower-case.c
//
@lixingcong
lixingcong / aria2.bat
Created September 12, 2016 13:15 — forked from aa65535/aria2.bat
Aria2的配置文件 & 启动脚本
:: 启动后需要保留窗口, 关闭窗口则结束进程
aria2c --conf-path=aria2.conf -D
@lixingcong
lixingcong / aria2
Created September 13, 2016 04:08 — forked from andrzejressel/aria2
init.d file for aria2c daemon (debian)
#!/bin/sh
### BEGIN INIT INFO
# Provides: aria2
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c init script.
@lixingcong
lixingcong / probe.php
Created September 14, 2016 11:13 — forked from DrayChou/p.php
lnmp 中带的 php 探针
<?php
/* ----------------本探针基于YaHei.net探针------------------- */
error_reporting(0); //抑制所有错误信息
@header("content-Type: text/html; charset=utf-8"); //语言强制
ob_start();
$title = "雅黑PHP探针";
$version = "v0.4.2"; //版本号
define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST']));
@lixingcong
lixingcong / README.md
Created September 16, 2016 15:03 — forked from smileart/README.md
My ZSH Theme — Agnoster Mod

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@lixingcong
lixingcong / nginx_google_version1.conf
Last active October 15, 2016 16:34
nginx reverse proxy for google
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
@lixingcong
lixingcong / title_change.js
Created October 24, 2016 07:34
change html tilte when switch over pages
var this_title=document.title;
document.addEventListener('visibilitychange', function() {
document.title = document.hidden ? this_title+":你看不到我~": this_title;
});
@lixingcong
lixingcong / recursively_get_links.py
Last active November 8, 2016 13:53
recursively get web page links