Skip to content

Instantly share code, notes, and snippets.

mywarr

Block or report user

Report or block mywarr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mywarr
mywarr / PTTWebAutoAIDLink.user.js
Created Jun 12, 2018 — forked from dannvix/PTTWebAutoAIDLink.user.js
自動為 PTT 網頁版的文章代碼加上連結的 userscript
View PTTWebAutoAIDLink.user.js
View .prettierrc
{
"printWidth": 120,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"bracketSpacing": true
}
@mywarr
mywarr / ramdisk.sh
Created Mar 13, 2018 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
View ramdisk.sh
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
View index.html
<div class="wrap">
<a href="#" class="start">Click to print</a>
<div class="test" data-text="帝旺 則取 2014/1/12 為目標日期,並取 前4天2014/1/8開始 到後4天 2014/1/16 結束 共取9 天"></div>
</div>
View 0. nginx_setup.sh
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@mywarr
mywarr / AccessDump.py
Last active Jul 9, 2019
use mdbtools to convert .mdb to .sqlite and .csv
View AccessDump.py
#!/usr/bin/env python
#
# AccessDump.py
# A simple script to dump the contents of a Microsoft Access Database.
# It depends upon the mdbtools suite:
# http://sourceforge.net/projects/mdbtools/
import sys, subprocess, os
DATABASE = sys.argv[1]
@mywarr
mywarr / gist:8663897
Created Jan 28, 2014
textfile processing notes sed etc..
View gist:8663897
remove empty lines
sed -i '/^[[:space:]]$/d' *.md
convert crlf to cr aka dos to unix with tr command.
for f (*.md) {tr -d '\r' < $f > $f_Without_CR.md}
View Animation-to-Explain-CSS-Triangles.markdown
@mywarr
mywarr / glyphs
Last active Dec 18, 2015
special characters
View glyphs
“   &#8220; opening double quote
”   &#8221; closing double quote
‘   &#8216; opening single quote
’   &#8217; closing single quote
–   &#8211; en dash
—   &#8212; em dash
−   &#8722; minus
×   &times; multiplication
...   &#8230; ellipsis
@mywarr
mywarr / gist:5110179
Last active Dec 14, 2015
Remove all installed gems at once
View gist:5110179
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
You can’t perform that action at this time.