Skip to content

Instantly share code, notes, and snippets.

View twlz0ne's full-sized avatar

twlz0ne

  • Fuzhou, China
View GitHub Profile
@Ambro17
Ambro17 / commit-msg
Created May 26, 2020 23:10
Auto Git Emoji
#!/usr/bin/python3.6
"""
Loosely based on gitmoji https://gitmoji.carloscuesta.me/
WIP: 🚧
Meant for work in progress. Incomplete or still an idea
NEW: ✨
New functionality that is working. Meant as a checkpoint
FIX: 🔧
Minor code changes/ Refactors that are steps before a NEW feature
BUG: 🐞
@mikroskeem
mikroskeem / gccemacs_osx.md
Last active July 11, 2023 14:59
gccemacs on OSX

gccemacs on OS X

Read this first: http://akrl.sdf.org/gccemacs.html

Prerequisites

1) GCC with libgccjit enabled

For that you need to compile gcc (duh). I edited Homebrew's gcc formula:

@ajinasokan
ajinasokan / flutter_desktop_macos.md
Last active November 22, 2019 14:38
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

@maelvls
maelvls / How-to-automate-build-bottles-your-homebrew-tap.md
Last active October 31, 2023 03:33
Automate build workflow for Homebrew tap bottles (Linux and macOS)

How to automate the build of bottles on your Homebrew tap

Note on Oct 4, 2018: due to a change in Homebrew's brew test-bot behaviour, the user must set HOMEBREW_TRAVIS_CI and HOMEBREW_TRAVIS_SUDO appropriately (it was previously using Travis-CI-provided TRAVIS and TRAVIS_SUDO).

This tutorial is a follow-up to the discussion we had on davidchall/homebrew-hep#114. It relies on a fork of the test-bot provided by davidchall; you can get it with brew tap maelvalais/test-bot. First:

  1. the Github project must be of the form https://github.com//homebrew- with the following tree
@rtrouton
rtrouton / gist:2ca6f001b3cecb5037825c7f9d2e422e
Created April 28, 2017 16:13
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
@davidjb
davidjb / recovery.sh
Created December 21, 2016 08:21
Create macOS Sierra Recovery Partition Without Reinstalling
TARGET="/Volumes/Macintosh HD" # Specify where to configure Recovery partition
MACOS_INSTALLER="/Applications/Install\ macOS\ Sierra.app" # Path to your macOS installer
# Remaining paths ahead are dependant on OS version
# This *should* support 10.9 and above but is only tested on 10.12
curl http://support.apple.com/downloads/DL1464/en_US/RecoveryHDUpdate.dmg -L -o ~/Downloads/RecoveryHDUpdate.dmg
hdiutil mount ~/Downloads/RecoveryHDUpdate.dmg
pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/recoveryupdate
@parmentf
parmentf / GitCommitEmoji.md
Last active May 2, 2024 20:29
Git Commit message Emoji
@chareice
chareice / validation.php
Created February 1, 2015 08:47
Localization Validation Message For Chineses With Laravel 5
<?php
use Symfony\Component\Yaml\Yaml;
return Yaml::parse(file_get_contents(base_path().'/resources/lang/zh_cn/validation.yml'));
@lmullen
lmullen / Makefile
Last active February 25, 2023 21:14
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@jordonbiondo
jordonbiondo / *scratch*.el
Last active May 25, 2018 12:14
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)