Skip to content

Instantly share code, notes, and snippets.

View hnq90's full-sized avatar
🎯
Focusing

Huy Nguyen Quang hnq90

🎯
Focusing
View GitHub Profile
A: Hello
BOT: Hello! Can I help you?
A: I want to find a nearby restaurant
BOT: Which type of food do you want to eat?
A: pizza
BOT: Please let me know where you are? (gửi location)
A: send location
Bot: Are you near here?.... Yes/No
A: Yes
BOT:
<?php
return [
'Security' => [
'salt' => '09af7be33b2ef8c91449a67ededf9bcb95343baa3bef7628c6f16cd2d34a9efa',
],
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Sqlite',
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
description
Sang trọng
Ăn vặt/vỉa hè
Nhà hàng
Café/Kem
Quán ăn
Bar/Pub
Karaoke
Tiệm bánh
Khu du lịch
// Place your settings in this file to overwrite default and user settings.
{
"react-native": {
"simulator": {
"device_name": "iPad Pro (9.7 inch)"
}
}
}
@hnq90
hnq90 / pouchdb_benchmark.js
Created June 9, 2017 07:39
PouchDB benchmark
import dream from 'dreamjs'
import PouchDB from 'pouchdb-react-native'
import SQLite from 'react-native-sqlite-2'
import SQLiteAdapterFactory from 'pouchdb-adapter-react-native-sqlite'
const SQLiteAdapter = SQLiteAdapterFactory(SQLite)
PouchDB
.plugin(SQLiteAdapter)
.plugin(require('pouchdb-adapter-asyncstorage').default)
.plugin(require('pouchdb-find'))
@hnq90
hnq90 / bash-cheatsheet.sh
Created May 31, 2017 01:36 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@hnq90
hnq90 / fbfeed2csv.py
Created April 25, 2017 02:05 — forked from yuzawa-san/fbfeed2csv.py
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
"""
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
yuzawa-san
https://github.com/yuzawa-san
"""
import json
import urllib2
import time
import csv
@hnq90
hnq90 / zing320.sh
Last active April 7, 2017 08:36
Download 320Kbps song from mp3.zing.vn
#!/bin/sh
songId=$1
parseJson () {
python -c "import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))";
}
fetch () {
local output=`wget -q --method GET --progress=dot --output-document - http://api.mp3.zing.vn/api/mobile/song/getsonginfo?requestdata={\"id\":\"$songId\"}`
local link=$(echo $output | parseJson "['source']['320']")