Skip to content

Instantly share code, notes, and snippets.

@jiayulu
jiayulu / Basic_Call_tracking.xml
Created April 13, 2019 05:57 — forked from dtolb/Basic_Call_tracking.xml
BXML For Call Tracking
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence gender="male" locale="en_US" voice="paul">Thank you for calling Tom's Tire Shop</SpeakSentence>
<Transfer transferCallerId="+19198281234">
<PhoneNumber>+19198281235</PhoneNumber>
<PhoneNumber>+19198281236</PhoneNumber>
<PhoneNumber>sip:[email protected]</PhoneNumber>
</Transfer>
</Response>
@jiayulu
jiayulu / gpgmutt.md
Created May 23, 2019 18:04 — forked from bnagy/gpgmutt.md
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@jiayulu
jiayulu / gpgmutt.md
Created May 23, 2019 18:04 — forked from bnagy/gpgmutt.md
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@jiayulu
jiayulu / latency.txt
Created October 6, 2019 08:39 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@jiayulu
jiayulu / .spacemacs
Created March 13, 2020 06:39 — forked from howl-anderson/.spacemacs
Automatically switch to English keyboard when leaving insert/replace mode in Evil of Spacemacs. And when you enter insert/replace mode again, switch to whatever input method you used last time. Especially useful when you are using other language (non-english) to write content.
(defun dotspacemacs/user-config ()
(setq shell-file-name "/bin/bash")
; set default var lang_source for ibus arg
(setq lang_source "xkb:us::eng")
; what we do when enter insert mode
(add-hook 'evil-insert-state-entry-hook
(lambda ()
(shell-command (concat "ibus engine " lang_source))))
@jiayulu
jiayulu / notes.py
Created April 5, 2023 20:56 — forked from IdanBanani/notes.py
some notes i've found
# -*- coding: utf-8 -*-
# To list this file sections: $ grep '^"" ' notes.py
"""""""""""""
"" Why Python ?
"""""""""""""
- extremely readable (cf. zen of Python + [this 2013 study](http://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/))
- simple & fast to write
- very popular (taught in many universities)
- has an extremely active development community