This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter | |
* | |
* @package php-bootstrap | |
* @author mytharcher | |
* @copyright Copyright (c) since 2013 | |
* @license MIT Licenced | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.set('partials', require('./lib/partials')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\w $ " | |
export CLICOLOR=1 | |
export GREP_OPTIONS="--color=auto" | |
alias cl="source cl.sh" | |
alias work="cd ~/work" | |
alias ll="ls -al" | |
alias ahosts="vi ~/etc/apache2/httpd-vhosts.conf" | |
alias vhosts="sudo vi /etc/hosts" | |
alias subl='open -a "Sublime Text 2"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* usage: | |
* | |
* $ node migrate.js path/to/posts/dir | |
*/ | |
var fs = require('fs'); | |
var path = require('path'); | |
var ENCODING = 'utf8'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function binarySearch (array, matcher) { | |
var len = array.length, | |
head = 0, | |
tail = len - 1, | |
offset = got = Math.ceil(tail / 2); | |
if (offset == tail) { | |
return offset; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Change all txt file from Windows form to Max form. | |
for post in $(find . -type f) | |
do | |
# echo $post | |
cat $post > temp.md | |
mv -f ./temp.md $post | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WORK_BASE=$(pwd) | |
CLIENT_DIR=$WORK_BASE/un-web-client/src/main/webapp | |
TEMP_DIR=$WORK_BASE/building_temp | |
cd $CLIENT_DIR | |
### process *.html -> tpl.html | |
sed 's/.*"\(.*\.html\)".*/\1/' "assets/js/~template.js" | grep tpl | xargs cat | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# references.rb: jekyll markdown references plugin | |
# | |
# add this file to your _plugins directory (create it if needed) | |
# create a file (exactly) named _references.md in your Jekyll site root, | |
# then add your markdown reference-style link definitions to it. | |
# for example: | |
# [jsshaper]: http://jsshaper.org "an extensible framework for JavaScript syntax tree shaping" | |
# | |
# you can now reference these links in any markdown file | |
# for example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# File compressor plugin for jekyll | |
# ================================= | |
# | |
# By [mytharcher](https://github.com/mytharcher) | |
# 2012-05-20 | |
# | |
# Updated by [nicoespeon](https://github.com/nicoespeon) | |
# 2013-04-12 | |
# |