- 浏览: 2564837 次
- 性别:
- 来自: 成都
-
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
文章列表
Common NPM Package and Installation
My colleague sets up a common library project. In that library project, the set up is simply as follow:
The package.json is as follow:
{
"name": “@sillycat/cscommon",
"version": "0.1.10",
"description": "A coll ...
Shell Script Create DynamoDB Tables
# how to run
# dynamodb-scripts/create-device-dynamo-tables.sh {ENV} {WriteCapacityUnits} {ReadCapacityUnits}
# eg: dynamodb-scripts/create-device-dynamo-tables.sh int 5 5
echo "Start to create the DynamoDb table"
aws dynamodb create-table --table-name s ...
Shell Script Execute on Remote Machine
I remember my previous company had this similar script.
#!/bin/bash
#####################################
# how to run
# ./dump-css-devices-to-csv.sh HOST PORT SYS_USER DB_NAME USER PASSWORD
#####################################
start=$SECONDS
DEFAULT_DB_H ...
Amazon DynamoDB Load Shared Config in NodeJS
Before load the AWS-SDK, set the system to load the Config file as well as the CREDETIAL file
> ls -l ~/.aws/
total 16
-rw-r--r-- 1 hluo staff 29 Apr 12 15:28 config
-rw------- 1 hluo staff 238 May 16 14:06 credentials
process.env.AWS_SDK_LOAD_ ...
Python Package(1)Async
asyncio
import asyncio
loop = asyncio.get_event_loop()
for record in event['Records']:
message = json.loads(record['Sns']['Message'])
loop.run_until_complete(asyncio.gather(meeting.incoming_msg(message['action'], message)))
return
It will keep sending messages to run ...
Online Course: Understanding TypeScript(2)Types
Tuples
let address: [number, string, string, string, number] = [3393, "superstar road", "austin", "texas", 78613];
Enum
enum Color {
Gray, //0
Green = 100, //1
Blue //2
}
let myColor: Color = Color.Blue;
console.log(myCo ...
Command Line to Run SOAPUI
The command line will be as follow:
> testrunner.sh -r ~/Documents/soap-ui/DevicePairingREST-soapui-project.xml
Remember to Add the TestCase in SOAPUI and Assertions.
If Some ClassNotFound Exception Happened, rename this file
/Users/hluo/.soapuios/plugins
To
/Users/ ...
2018 Scrapy Environment Enhance(4)Docker Service for Scrapyd and Tor Network
Docker Service for Scrapyd
http://sillycat.iteye.com/blog/2422861
Docker Service for Tor Network
There are 3 ports and 3 different function services.
Tor 9051 Port reset IP
Tor 9050 Port to proxy
Privoxy 8118 to proxy to 9 ...
2018 Scrapy Environment Enhance(3)Docker ENV
Set Up Scrapy Ubuntu DEV
>sudo apt-get install -qy python python-dev python-distribute python-pip ipython
>sudo apt-get install -qy firefox xvfb
>sudo apt-get install -qy libffi-dev libxml2-dev libxslt-dev lib32z1-dev libssl-dev
> sudo apt-ge ...
Online Course: Understanding TypeScript(1)Introduction
Init the TypeScript Workspace
>mkdir ts-course
Init the NPM management
>npm init
It will generate the file package.json
{
"name": "ts-course",
"version": "1.0.0",
"description": &qu ...
AMAZON DynamoDB(4)Cli Command to Create/Delete Table
Delete the dynamoDB from command line
> cat dynamodb-scripts/delete-device-dynamo-tables.sh
# how to run
# dynamodb-scripts/delete-device-dynamo-tables.sh {ENV}
# eg: dynamodb-scripts/delete-device-dynamo-tables.sh int
aws dynamodb delete-tabl ...
Amazon Aurora(2)Dump Data to CSV
Install MySQL on MAC
> brew install mysql
> mysql --version
mysql Ver 14.14 Distrib 5.7.22, for osx10.13 (x86_64) using EditLine wrapper
Dump Script similar to This
> mysql -f -h127.0.0.1 -P3301 -ucloudmaster -pxxxxxx -Dmasterserver --batch -e "sele ...
AMAZON DynamoDB(3)CRUD Item
BatchWriteItem we are using that to save data into DynamoDB. But BatchWriteItem cannot update items, to update items, use the UpdateItem action.
DynamoDB Operation List
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Operations.html
How to Truncate al ...
Amazon Aurora(1)Introduction
5 times performance than MySQL, SQL similar to MySQL 5.6.
Performance 5.7 is 100W QPS
http://dimitrik.free.fr/blog/archives/2014/11/mysql-performance-57-and-rds-aurora-so-what.html
Price
https://aws.amazon.com/rds/aurora/pricing/
Java connect to Aurora
https://docs.aw ...
Shuttle Manage the SSH Config
Install that tool on MAC
Open the settings, the settings file named .shuttle.json
It will be similar to this:
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi' ...