Skip to content

Instantly share code, notes, and snippets.

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

@zdway10
zdway10 / split-and-count.cljs
Created June 9, 2020 15:06 — forked from realgenekim/split-and-count.cljs
Create sorted word frequencies for word clouds, using Lumo and ClojureScript
;; using lumo for ClojureScript: https://github.com/anmonteiro/lumo
;;
;; https://www.wordclouds.com/
;; - size: 1920x1080
;; - size is typically around -45
;; - shape: rectangle
;; - theme: black on white
;; - font: Ariel
;;
;; PS: Over the last 30 years, I've probably written this program over
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer:
@zdway10
zdway10 / mac_fuck_gfw.sh
Created March 17, 2020 22:59 — forked from xiaolai/mac_fuck_gfw.sh
FUCK GWF apple script
#!/user/bin/env bash
on_die() {
echo
echo byebye proxy
echo
networksetup -setsocksfirewallproxystate "Ethernet 2" off #close the proxy
# the name can be "wifi" or "Ethernet 1", just see what is listed in "network preference"
}
@zdway10
zdway10 / default.custom.yaml
Created March 17, 2020 22:59 — forked from xiaolai/default.custom.yaml
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: terra_pinyin # 地球拼音 dì qiú pīn yīn
#===========================================
# Author: Francis Varga
# eMail: [email protected]
# Blog: flexbuddha.posterous.com
#===========================================
#
# This is my .gitconfig file
#
# Did you have question ask me ;)...
[user]
@zdway10
zdway10 / rspec-syntax-cheat-sheet.rb
Created March 17, 2020 22:58 — forked from xiaolai/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@zdway10
zdway10 / smser.rb
Created March 17, 2020 22:58 — forked from xiaolai/smser.rb
短信宝
# -*- encoding: utf-8 -*-
require 'digest/md5'
require 'nestful'
class Smsbao
attr_accessor :login, :passwd
def initialize(login, passwd)
@login = login
@passwd = Digest::MD5.hexdigest(passwd)
@zdway10
zdway10 / nokogiri libxml homebrew lion
Created March 17, 2020 22:58 — forked from xiaolai/nokogiri libxml homebrew lion
How to fix: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
@zdway10
zdway10 / sublime_user_settings.js
Created March 17, 2020 22:57 — forked from xiaolai/sublime_user_settings.js
Example user settings for sublime text 2
{
"color_scheme": "Packages/User/textmate-solarized/Solarized (Dark).tmTheme",
// "color_scheme": "Packages/User/textmate-solarized/Solarized (Light).tmTheme",
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night-Eighties.tmTheme",
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night-Bright.tmTheme",
// "color_scheme": "Packages/User/TextMate-Tomorrow-Theme/Tomorrow-Night.tmTheme",
"font_size": 12,
"font_face": "menlo",
// "font_face": "monaco",
// "font_face": "Inconsolata",