Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
ten.rik.ai

dc dcsan

💭
ten.rik.ai
View GitHub Profile
@dcsan
dcsan / resume.json
Last active Sep 20, 2019
resume.json
View resume.json
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "David 'DC' Collier",
"label": "Creative Engineer",
"picture": "",
"email": "dc@rikai.co",
View logger.sh
#!/usr/bin/env bash
set -x
APP_NAME=$1
echo "logs for APP ${APP_NAME}"
ssh ubuntu@bots.rikai-bots.com "pm2 logs author.${APP_NAME}"
View WeChat JS SDK
! function(a, b) {
"function" == typeof define && (define.amd || define.cmd) ? define(function() {
return b(a)
}) : b(a, !0)
}(this, function(a, b) {
function c(b, c, d) {
a.WeixinJSBridge ? WeixinJSBridge.invoke(b, e(c), function(a) {
g(b, a, d)
}) : j(b, d)
}
@dcsan
dcsan / bots
Last active Dec 27, 2016
bots.json
View bots
// keywords will trigger anywhere inside a block of text
const keywords = {
"spanish food": "I love Paella!",
"thai food": "I love TomYum soup!",
// you can have multiline texts
// surround it with backticks: ` ` (not single ' ' quotes )
"san francisco": `The Golden Gate City!
I love san francisco!
@dcsan
dcsan / bots
Created Dec 27, 2016
bots.json
View bots
// keywords will trigger anywhere inside a block of text
const keywords = {
"spanish food": "I love Paella!",
"thai food": "I love TomYum soup!",
// you can have multiline texts
// surround it with backticks: ` ` (not single ' ' quotes )
"san francisco": `The Golden Gate City!
I love san francisco!
View RoomRegex
const debug = require('debug')("test:RoomData");
// var test = require('tape');
const test = require('tape-async');
test('join regex', (t) => {
let pairs = [
{
msg: '"$invitee😀" joined the group chat via the QR Code shared by "$invitee😀"',
@dcsan
dcsan / bst.js
Created Jul 28, 2016 — forked from trevmex/bst.js
A simple binary search tree in JavaScript
View bst.js
/*
* File: bst.js
*
* A pure JavaScript implementation of a binary search tree.
*
*/
/*
* Class: BST
*
View using themes
var Spacing = MUI.Styles.Spacing;
var Colors = MUI.Styles.Colors;
var ColorManipulator = MUI.Utils.ColorManipulator;
AppTheme = {
appBar: {
color: '#15e71d',
textColor: 'white'
},
View RebotParseTest.js
Rebot.parseTest = function() {
var blob = {
"begin": {
"global": {
"debug": true
},
"var": {
"name": "EnglishChat",
"botname": "EnglishChatBot",
View designer.html
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
#section {
box-sizing: border-box;