Skip to content

Instantly share code, notes, and snippets.

Chunliang Lyu cllu

Block or report user

Report or block cllu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Mount Synology basic

I want to mount a previous Synology basic volume (wasn't using RAID or SHR) to copy data to a new drive.

Plug it in the USB port doesn't work, showing (Partition 1 does not start on phyical sector boundary).

# fdisk -l
Disk /dev/sdr: 2.7 TiB, 3000558944256 bytes, 5860466688 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
cllu /
Created Oct 29, 2018
Python async HTML crawling with a list of proxies
#!/usr/bin/env python3
from os import listdir
from os.path import isfile
from time import time, sleep
from threading import Thread, Lock
import json
import random
import asyncio
cllu / HelvetiNews.user.js
Last active Oct 14, 2017
HelvetiNews - A Minimalist Theme for HackerNews from
View HelvetiNews.user.js
// ==UserScript==
// @name HelvetiNews
// @namespace
// @version 0.2
// @description A Minimalist Theme for HackerNews
// @author dwynings
// @match*
// @downloadURL
// @resource styles
// @grant GM_addStyle
View pdf2eps
conversion (){
# get file name without extension, full path
b=`basename $b`
full=`grealpath $1`
echo "Converting: $1 (Absolute path: $full)"
cllu / index.html
Created Jul 8, 2016
Reveal.js for MediaWiki
View index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>reveal.js – The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
cllu / CustomParser.php
Last active Mar 31, 2016
MediaWiki custom parser
View CustomParser.php
# Confirm MediaWiki environment
if (!defined('MEDIAWIKI')) die();
# Credits
$wgExtensionCredits['other'][] = array(
'author'=>'Chunliang Lyu',
View markdown draft-js
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Draft • Decorators</title>
<link rel="stylesheet" href="../../dist/Draft.css" />
<div id="target"></div>
<script src="../../node_modules/react/dist/react.js"></script>
cllu / hn_seach.js
Last active Dec 9, 2015 — forked from meiamsome/hn_search.js
HackerNews Who is Hiring TamperMonkey Script
View hn_seach.js
// ==UserScript==
// @name HackerNews WhosHiring
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match*
// @grant none
// ==/UserScript==
/* jshint -W097 */
cllu /
Last active Sep 30, 2016
CUHK Network auto connection Python script
import requests
def login():
"""Post the login info to the CUHK authentication server"""
url = ""
cllu /
Last active Sep 25, 2016
GitHub Wiki TamperMonkey script

GitHub Wiki TamperMonkey script

  • add word count
  • remove unused stuff
  • add Table of Content to the right column
  • Add keyboard shortcuts: double click content area to edit

The script matches only wikis on my own GitHub repos, change it according to your preferences:

You can’t perform that action at this time.