Skip to content

Instantly share code, notes, and snippets.

View twlz0ne's full-sized avatar

twlz0ne

  • Fuzhou, China
View GitHub Profile
; $Id: helm-ls.el,v 1.4 2018/01/22 21:39:56 thierry Exp $
(defvar helm-source-ls
(helm-build-async-source "ls"
:candidates-process (lambda ()
(let* ((basedir (if (file-directory-p helm-pattern)
helm-pattern
(helm-basedir helm-pattern)))
(proc
(start-file-process "hls" nil "ls"
@twlz0ne
twlz0ne / txt2epub.py
Created May 30, 2020 09:06 — forked from scturtle/txt2epub.py
txt to epub
# coding: utf-8
import os
#书籍信息
title='test book'
creator='scturtle'
description='blablablabla'
#章节文件
txtlist=['1.txt','2.txt']
@twlz0ne
twlz0ne / flutter_desktop_macos.md
Created May 25, 2019 06:42 — forked from ajinasokan/flutter_desktop_macos.md
Run Flutter apps in MacOS with IDE support and hot reloading

This setup is only for MacOS. I don't have a windows/linux machine to test.

Clone FDE repo

cd ~
git clone https://github.com/google/flutter-desktop-embedding

Switch to flutter master

@twlz0ne
twlz0ne / gist:1719b66455e5efd110be0ccb925e5fbb
Created May 12, 2019 16:13 — forked from rtrouton/gist:2ca6f001b3cecb5037825c7f9d2e422e
Xcode iOS simulator download URLs (as of Xcode 8.3.1)
iOS 10.2 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_2-10.2.1.1484185528.dmg
iOS 10.1 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_1-10.1.1.1476902849.dmg
iOS 10.0 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_0-10.0.1.1474488730.dmg
iOS 9.3 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg
iOS 9.2 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_2-9.2.1.1451951473.dmg
iOS 9.1 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_1-9.1.1.1446593668.dmg
iOS 9.0 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_0-9.0.1.1443554484.dmg
iOS 8.4 Simulator: https://devimages.a
@twlz0ne
twlz0ne / *scratch*.el
Created May 25, 2018 12:14 — forked from jordonbiondo/*scratch*.el
Create an async.el-friendly lambda that uses variables and functions bound in the current emacs instance.
(defmacro value-bound-lambda (args symbols &rest body)
"Returns a lambda expression with ARGS, where each symbol in SYMBOLS is
available for use and is bound to it's value at creation.
Symbols needs to be a list of variables or functions available globally."
(declare (indent defun))
(let ((vars (remove-if-not 'boundp symbols))
(funcs (remove-if-not 'functionp symbols)))
`(lambda ,args
(let ,(mapcar (lambda (sym) (list sym (symbol-value sym))) vars)