Skip to content

Instantly share code, notes, and snippets.

@jsfaint
jsfaint / sdr-clean.sh
Created June 5, 2015 03:08
Kindle Utility: Clean orphan sdr folder which books has been removed
#!/bin/bash
#author: Jia Sui
#email: jsfaint@gmail.com
#Description: Clean orphan sdr folder which books has been removed.
# Check if Kindle was mounted
df -h | grep -i kindle > /dev/null
if [[ $? -ne 0 ]]; then
echo "Kindle was not mounted"
exit 1
@tabletick
tabletick / audio_tag.rb
Created September 6, 2012 10:08
Audio/MP3 Plugin for Octopress
# Title: MP3 tag for Jekyll
# Authors: Devin Weaver, Daniel Roos (youtube changes)
# Description: Allows mp3 tag to include mp3 files embedded into the post.
# It uses the player 'audio.js' from http://kolber.github.com/audiojs/
#
# Install the plugin according to the manuel of the author by adding the necessary lines to the head-template
# and adding the files into the right directories.
#
# Please read my [blog post about it][2].
#
@agarrharr
agarrharr / feed.rss
Last active October 21, 2017 06:29
Jekyll Podcast Feed
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>{{ site.title }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}</link>
<language>en</language>
<managingEditor>{{ site.managerName }} ({{ site.managerEmail }})</managingEditor>
@marten-de-vries
marten-de-vries / api.pot
Created December 21, 2014 14:34
A base for a node js jekyll gettext preprocessor - requires docs/nl to exist and expects the first user visible string in api.md to be wrapped in a {%t %} tag.
msgid ""
msgstr ""
msgid "Most of the PouchDB API is exposed as `fun(arg, [options], [callback])` where both the options and the callback are optional. Callbacks use the `function(err, result)` idiom where the first argument will be undefined unless there is an error, and the second argument holds the result."
msgstr ""
@haikebang
haikebang / hacker-howto.md
Created September 6, 2018 07:29 — forked from zer4tul/hacker-howto.md
Simplified Chinese edition of ESR's How To Become A Hacker
/**
* A Javascript object to encode and/or decode html characters using HTML or Numeric entities that handles double or partial encoding
* Author: R Reid
* source: http://www.strictly-software.com/htmlencode
* Licences: GPL, The MIT License (MIT)
* Copyright: (c) 2011 Robert Reid - Strictly-Software.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI
@lixingcong
lixingcong / Amplify.txt
Last active November 22, 2019 00:27
Amplify block list for my phone
微信
版本 6.7 GooglePlay版
唤醒锁
正则表达式 WakerLock:+[0-9]{0,26} 间隔999999
SyncService
StnCallBack
定时器
# 正则表达式设置Amplify链接 https://forum.xda-developers.com/showpost.php?p=64411243&postcount=6237
正则表达式 ALARM_ACTION+[(0-9)]{0,26} 间隔999999
com.tencent.mm/.booter/MMReceivers$AlarmReceiver 间隔60
@redoPop
redoPop / anki_mobile_card.html
Created February 7, 2015 19:22
HTML used by AnkiMobile to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS. When used by AnkiMobile, the card's HTML replaces the `<!-- (Card contents) -->` comment in this gist, with the shared styles dropped inline inside a `<style>` tag.
<!doctype html>
<html class=" webkit safari mobile iphone js">
<head>
<meta name="viewport" content="width=device-width;">
<style id="ss"></style>
<style>
body {
text-align: center;
font-size: 1em;
-webkit-transform: translate3d(0,0,0);
@lotem
lotem / luna_pinyin.custom.yaml
Last active April 16, 2022 08:02
導入碼表示例
# luna_pinyin.custom.yaml
# 修改字典名爲 luna_pinyin.kunki
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin
patch:
translator/dictionary: luna_pinyin.kunki
@mytharcher
mytharcher / compressor.rb
Last active May 10, 2022 01:56
A jekyll plugin for compressing HTML, JavaScript files when rendering.
#
# File compressor plugin for jekyll
# =================================
#
# By [mytharcher](https://github.com/mytharcher)
# 2012-05-20
#
# Updated by [nicoespeon](https://github.com/nicoespeon)
# 2013-04-12
#