Skip to content

Instantly share code, notes, and snippets.

@cllu
cllu / index.html
Created July 8, 2016 03:08
Reveal.js for MediaWiki
<!doctype html>
<html lang="en">
<head>
<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">
#!/bin/bash
conversion (){
# get file name without extension, full path
b="${1%%.*}"
b=`basename $b`
full=`grealpath $1`
echo "Converting: $1 (Absolute path: $full)"
@cllu
cllu / HelvetiNews.user.js
Last active October 14, 2017 00:13
HelvetiNews - A Minimalist Theme for HackerNews from http://www.helvetinews.com/
// ==UserScript==
// @name HelvetiNews
// @namespace http://tampermonkey.net/
// @version 0.2
// @description A Minimalist Theme for HackerNews
// @author dwynings
// @match https://news.ycombinator.com/*
// @downloadURL https://gist.githubusercontent.com/cllu/276fb0cd574006f4f343ef1515dac5ce/raw/HelvetiNews.user.js
// @resource styles https://gist.githubusercontent.com/cllu/276fb0cd574006f4f343ef1515dac5ce/raw/hn.css
// @grant GM_addStyle
@cllu
cllu / crawl.py
Created October 29, 2018 23:52
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

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