Skip to content

Instantly share code, notes, and snippets.

View kcliu's full-sized avatar

kcliu kcliu

View GitHub Profile
stdin: is not a tty
/tmp/vagrant-shell: line 3: npm: command not found
cp:
cannot stat `node_modules'
: No such file or directory
/tmp/vagrant-shell: line 6: npm: command not found
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
================================================================================
Error executing action `create` on resource 'remote_file[/tmp/vagrant-chef-1/ACCC4CF8.asc]'
================================================================================
Errno::ENETUNREACH
------------------
Network is unreachable - connect(2)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<true/>
<key>AllowClipboardAccess</key>
<true/>
<key>AnimateDimming</key>
<false/>
@kcliu
kcliu / gist:6622606
Last active December 23, 2015 10:39
// build:css(release) css/combined/css_common.css
link(href='css/new_style/style_partner.css', rel='stylesheet', type='text/css')
link(href='css/jquery-ui/custom-theme/jquery-ui-1.8.9.custom.css', rel='stylesheet', type='text/css')
// endbuild
| {if $partner.info.css != ''}
link(href='{$partner.info.css}', rel='stylesheet', type='text/css')
| {/if}
| {if $from == 'facebook'}
link(href='css/new_style/style_fb.css', rel='stylesheet', type='text/css')
| {/if}
09-23 00:23:16.195: D/lights(1398): set_light_buttons_func: on=6645093 brightness=101
09-23 00:23:16.195: D/lights(1398): set_light_buttons_func: on=16777215 brightness=255
09-23 00:23:16.295: D/View(6611): onTouchEvent: viewFlags: 0x18004001
09-23 00:23:16.295: D/View(6611): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
09-23 00:23:16.295: I/ActivityManager(1398): Starting activity: Intent { act=android.intent.action.PICK dat= typ=vnd.android.cursor.dir/artistalbum flg=0x4000000 cmp=android/com.android.internal.app.ResolverActivity (has extras) } from pid 6611
09-23 00:23:16.395: I/CarouselTimeLog(1565): onStart() finish: 1379866996400
09-23 00:23:16.415: D/ATRecorder(1398): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@40a624d8
09-23 00:23:16.415: D/WindowManagerImpl(1398): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView@40de3010
09-23 00:23:16.475: V/ActivityManager(1398): Checking to rest
@kcliu
kcliu / gist:8902292
Last active August 29, 2015 13:56
wtfood
<?php
// FIXME: should be replace with cdn URL
wp_enqueue_script('wtfoodjs','cdn://wtfood.js');
$data = array('current_post_id' => __($thb_page_id);
wp_localize_script('wtfoodjs', 'php_data', $data);
@kcliu
kcliu / wtfood.js
Last active August 29, 2015 13:56
ern = 'restaurant/tw/wordpress/' + php_data.current_post_id;
v4 = new V4('5mjc6wssgf');
v4.emit('content_view', {content_ern: ern});
public function getByPostOfficeNumber($args)
{
$reader = new ArgReader();
$reader->defineIntArg('post_office_number', array(ArgReader::ARG_IS_REQUIRED));
$args = $reader->read($args);
$purchaseRow = UnionPurchaseDao::getInstance()->getDataByWhere(array(
'post_office_number' => $args['post_office_number'],
), array(
CC::ID
@kcliu
kcliu / split.php
Last active August 29, 2015 13:58
<?php
$valueCards = \__::map($purchaseRes->getPrepayItems(), function($item) {
\__::chain()
->range($item->getTotalQuantity())
->map(function () use ($item) {
return ValueCard::create(array(
$item->getProductIdentifier() => 1,
));
})
->values();
{
"color_scheme": "Packages/Base16 Color Schemes/base16-eighties.dark.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",