Skip to content

Instantly share code, notes, and snippets.

/*
* libwebsockets-test-server - libwebsockets test implementation
*
* Copyright (C) 2010-2011 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation:
* version 2.1 of the License.
*
<style type="text/css">
* {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
287 bytes read in 27 ms (9.8 KiB/s)
## Executing script at 43100000
reading uImage
4925504 bytes read in 264 ms (17.8 MiB/s)
reading sun7i-a20-cubietruck.dtb
26288 bytes read in 30 ms (855.5 KiB/s)
## Booting kernel from Legacy Image at 46000000 ...
def main():
x = 1
y = ""
time = 0
loop = 0
f = open('prepare_data.txt','r')
for line in f:
if line.startswith('real'):
time+=(float(".".join(line.split("\t")[1].split('m')[1][:-2].split('.'))))
if x%10 == 0 :
#install remote desktop
sudo apt-get install xrdp
#install software
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install libusb-1.0-0.dev
sudo apt-get install build-essential
#get source code and compile
@aorjoa
aorjoa / gist:e568826405c9540d6ecf
Created September 2, 2015 06:34
Docker on MKIII error overay fs
root@rack-3-nodes-11:~# sudo docker -d -D
DEBU[0000] waiting for daemon to initialize
ERRO[0000] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.
DEBU[0000] Using graph driver vfs
DEBU[0000] Creating images graph
DEBU[0000] Restored 0 elements
DEBU[0000] Creating repository list
INFO[0000] +job init_networkdriver()
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
@aorjoa
aorjoa / gist:5fe0c46920f164990020
Created October 22, 2015 19:30
Gdisk for fixed MBR boot Mac OS (rEFIt)
$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 1.0.1
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
@aorjoa
aorjoa / gist:c8e278f6d1b7b0f7b056
Last active December 9, 2015 04:55
Compiled QFS on TK1
== How to? ==
1) แก้ source list ให้เป็นดังนี้ (ผมใส่ architecture มันเข้าไปด้วย ไม่งั้นมันอัพเดทไม่ได้ครับ)
'''
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe multiverse
deb-src [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe multiverse
## Major bug fix updates produced after the final release of the
@aorjoa
aorjoa / gist:a83da260e63e1267390b
Last active December 17, 2015 04:36
Spark with QFS
1) Set environment following :
// set enviroment variable Hadoop - QFS interface.
$ export SPARK_CLASSPATH=/home/ubuntu/qfs-1.1.4/build/java/hadoop-qfs/hadoop-2.5.1-qfs-.jar:/home/ubuntu/qfs-1.1.4/build/java/qfs-access/qfs-access-.jar
// set enviroment variable for qfs_access library. (If not set qfs_accent can't be load)
$ export LD_LIBRARY_PATH=/home/ubuntu/qfs-1.1.4/build/release/lib/
2) start sample QFS chunkserver and metaserver via python script.
$ ./examples/sampleservers/sample_setup.py -a install
and you can see something at http://localhost:22000
@aorjoa
aorjoa / sample_qfs_tool.cfg
Last active December 19, 2015 18:33
QFS script for aiyara
#### Config network interface with static IP address)
vi /etc/network/interfaces
auto eth4
iface eth4 inet static
address 192.168.5.201
netmask 255.255.255.0
gateway 192.168.5.9