Skip to content

Instantly share code, notes, and snippets.

View kcliu's full-sized avatar

kcliu kcliu

View GitHub Profile
@kcliu
kcliu / cloudSettings
Created March 21, 2018 11:20
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-21T11:20:32.936Z","extensionVersion":"v2.9.0"}
import styled from 'styled-components';
const isCurrent = (current, key) => current.group === key[0] && current.attr === key[1] ? true : false;
const hoverColor = '#9c9c9c';
const activeColor = '#00bbff';
const pressColor= '#6c6c6c';
export const BorderWrap = styled.div`
position: relative;
@kcliu
kcliu / app.js
Created March 29, 2017 08:22
app params
params: {
template: 0,
avatar: {
name: 'AVATAR NAME',
title: 'TITLE',
color: '#2c2c2c',
background: '#efefef',
},
chatArea: {
background: '#e4e4e4',
import path from 'path';
const config = {
entry: './src/app.js',
output: {
path: './public/build',
filename: 'app.bundle.js',
},
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var twoSum = function(nums, target) {
dict = {};
for(i = 0; i < nums.length; i++) {
dict[nums[i]] = i;
@kcliu
kcliu / booking.json
Last active January 15, 2016 07:52
ad booking
{
"campaign_id": "123",
"package": "456",
"creative name": "aaa",
"channels": [
{
"channel_name": "FOX",
"prime_time": [
"2016011504",
"2016011505",
{
"name": "starter-kit",
"private": true,
"version": "0.1.0",
"description": "Scaffolding",
"repository": "",
"scripts": {
"all": "npm run deploy:staging && npm run deploy:production",
"assets": "cp src/assets/* ./dist",
"compile": "webpack --config ./config/webpack.dist.babel.js",
'use strict'
# return: google map object wrapped by promise
gmapData = ($q) ->
geoCode: (lat, lng, addr) ->
# 台北市大安區復興南路一段205號6樓
# lat: 25.0395041
# lng: 121.5439738
deferred = $q.defer()
# [not not] syntax is for int transformer
{
"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",
@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();