Skip to content

Instantly share code, notes, and snippets.

@jakwings
jakwings / pinyin.dict.yaml
Last active Apr 15, 2017
擴展拼音方案
View pinyin.dict.yaml
# Rime dictionary
# encoding: utf-8
#
# 擴展拼音 Kuò'zhǎn Pīn'yīn
---
name: pinyin
version: "2016.6.25"
sort: original
use_preset_vocabulary: false
@jakwings
jakwings / gist:44a22515d2b0621a145d
Created Feb 27, 2016 — forked from paulczar/gist:5493708
Patch to fix libiconv for glibc >= 2.16 - originally found at http://www.itkb.ro/kb/linux/patch-libiconv-pentru-glibc-216
View gist:44a22515d2b0621a145d
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
@jakwings
jakwings / mycamera
Created Oct 9, 2014
A simple shell script to disable camera on Mac.
View mycamera
#!/usr/bin/env bash
declare -a arr=(
/Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
/Library/CoreMediaIO/Plug-Ins/FCP-DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
/System/Library/Frameworks/CoreMediaIO.framework/Versions/Current/Resources/VDC.plugin/Contents/MacOS/VDC)
trigger () {
for i in ${arr[@]}; do
sudo chmod $1 $i
@jakwings
jakwings / repl-client.js
Last active Mar 28, 2018 — forked from TooTallNate/repl-client.js
Running a "full-featured" REPL using a net.Server and net.Socket [FIX: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions]
View repl-client.js
var net = require('net');
var socket = net.connect(2333);
process.stdin.pipe(socket);
/// For backwards compatibility with Node program older than v0.10,
/// readable streams switch into "flowing mode" when a 'data' event handler
/// is added, or when the pause() or resume() methods are called.
process.stdin.on('data', function (buffer) {
if (buffer.length === 1 && buffer[0] === 0x04) { // EOT
View dabblet.css
/**
* flower
*/
div {
position: absolute;
top: 100px;
left: 100px;
}
div:nth-child(odd) {
View dabblet.css
/**
* Arc
*/
div {
position: relative;
transition: top 1s ease-in, left 1s ease-out;
}
body:hover div {
top: 100px;
@jakwings
jakwings / dabblet.css
Created Apr 16, 2013
Move in a circle without wrapper elements
View dabblet.css
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
@jakwings
jakwings / dabblet.css
Created Apr 16, 2013 — forked from LeaVerou/dabblet.css
Move in a circle without wrapper elements
View dabblet.css
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
@jakwings
jakwings / dabblet.css
Created Apr 4, 2013 — forked from LeaVerou/dabblet.css
Typing animation with pure CSS.
View dabblet.css
/**
* Typing animation with pure CSS.
* Works best in browsers supporting the ch unit.
*/
@keyframes typing { from { width: 0; } }
@keyframes blink-caret { 50% { border-color: transparent; } }
h1 {
font: bold 200% Consolas, Monaco, monospace;