Skip to content

Instantly share code, notes, and snippets.

View zhaofengli's full-sized avatar

Zhaofeng Li zhaofengli

View GitHub Profile
@jake284773
jake284773 / README.md
Last active April 20, 2018 05:29
Monokai Colour Scheme for Chrome Secure Shell.

Monokai Colour Scheme for Chrome Secure Shell

To apply this colour scheme, paste the prefs.js file into the JavaScript Console.

@johanneswuerbach
johanneswuerbach / .travis.yml
Last active March 24, 2025 17:40
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@unot
unot / zip2cbz.sh
Last active November 14, 2017 14:20
Zipped jpeg files to CBZ file for Kobo Glo.
#!/bin/bash -ex
# zip2cbz.sh
# Written by Takashi UNO
# require: zip, ImageMagick
if [ $# -ne 1 ]; then
echo "USAGE: `basename $0` hogehoge.zip"
exit 1
fi

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@iangreenleaf
iangreenleaf / yaml.vim
Created March 15, 2011 17:38
Dumb-smart indentation for Yaml
" Vim indent file
" Language: Yaml
" Author: Ian Young
" Get it bundled for pathogen: https://github.com/avakhov/vim-yaml
if exists("b:did_indent")
finish
endif
"runtime! indent/ruby.vim
"unlet! b:did_indent
@jakebellacera
jakebellacera / ICS.php
Last active March 11, 2025 21:41
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*