Skip to content

Instantly share code, notes, and snippets.

lucifr

Block or report user

Report or block lucifr

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
@lucifr
lucifr / init.lua
Last active Jun 10, 2018
My Hammerspoon config file
View init.lua
-- -------------------------------
-- Watcher for changes of init.lua
-- -------------------------------
function reloadConfig(files)
doReload = false
for _,file in pairs(files) do
if file:sub(-4) == ".lua" then
doReload = true
end
end
@lucifr
lucifr / 115fullwindowmod.user.js
Last active Jan 29, 2016
100% width and height in 115.com player
View 115fullwindowmod.user.js
// ==UserScript==
// @name 115 Player Full-Window-Mod
// @namespace http://lucifr.com/
// @version 0.1
// @description 100% width and height in 115.com player
// @author Lucifr
// @include http://*.115.com/*
// @include http://115.com/*
// @grant GM_addStyle
// ==/UserScript==
View QuickViewer.py
# coding: utf-8
from objc_util import *
import appex
SFSafariViewController = ObjCClass('SFSafariViewController')
def open_in_safari_vc(url):
vc = SFSafariViewController.alloc().initWithURL_entersReaderIfAvailable_(nsurl(url), True)
@lucifr
lucifr / wubi_pinyin.emoji.dict.yaml
Last active Feb 8, 2018
Wubi Pinyin Extended Dictionary(emoji) for Rime
View wubi_pinyin.emoji.dict.yaml
# Rime dictionary
# encoding: utf-8
#
# Wubi Pinyin Extended Dictionary(emoji) - 五笔拼音擴充詞庫(表情)
#
# by @lucifr
# based on https://gist.github.com/lembacon/4593540 & http://www.jianshu.com/p/ef2d9442fb0c
#
# 部署位置:
# ~/.config/ibus/rime (Linux)
@lucifr
lucifr / AOL Reader Compact.css
Created Jun 29, 2013
Ads removed. More compact layout.
View AOL Reader Compact.css
.header {
height:49px!important
}
.profile {
margin-top:5px!important
}
.app-logo {
margin-top:14px!important
@lucifr
lucifr / resize.scpt
Created Apr 20, 2013
Batch resize batch images in OS X with Applescript
View resize.scpt
tell application "System Events"
activate
set theWidth to display dialog "Enter the width" default answer "650"
set theWidth to the text returned of theWidth as real
end tell
global theWidth
tell application "Finder"
set some_items to selection as list
repeat with aItem in some_items
set contents of aItem to aItem as alias
@lucifr
lucifr / private.xml
Created Feb 17, 2013
My KeyRemap4MacBook private.xml
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>F19 to F19</name>
<appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, F19)</appendix>
<identifier>private.f192f19</identifier>
<autogen>
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::COMMAND_L,
@lucifr
lucifr / markdown.js
Created Jan 2, 2013
markdown.js for hexo
View markdown.js
var marked = require('marked'),
mdiscn = require('discount'),
_ = require('underscore'),
highlight = require('../util').highlight,
extend = require('../extend');
var regex = {
backtick: /^`{3}\s*([^\n]+)\n([^`]+)/,
captionUrl: /([^\s]+)\s*(.*)(https?:\/\/\S+)\s*(.*)/,
caption: /([^\s]+)\s*(.*)/
@lucifr
lucifr / image_process.bash
Created Sep 20, 2012
a bash script for Alfred Extension to process screenshot.
View image_process.bash
#!/bin/bash
#
# requirements:
# - ImageMagick: http://www.imagemagick.org/script/binary-releases.php#macosx
# - image_optim: https://github.com/toy/image_optim
# - a scp supported host with ssh key paired
# setting up the enviroment
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH
@lucifr
lucifr / PlainTasks_Tutorial_zhCN.todo
Created Sep 18, 2012
PlainTasks 教程中文版
View PlainTasks_Tutorial_zhCN.todo
如何使用 PlainTasks:
项目:
☐ 任何以冒号结尾的行都会被作为项目标题
☐ 可以通过缩进在项目中创建新的项目
☐ 项目可以被折叠(利用了编辑器的原生功能)
任务:
可以在任何位置添加普通文本作为笔记或描述;
就是这么简单!
You can’t perform that action at this time.