Programming2015. 5. 22. 01:29

아주 재밌는고 유용한 project입니다. 리눅스의 스위시 아미 칼 같다고 스스로를 소개합니다. 왠만한 GNU Util은 다 여기에 porting된것 같습니다. 간단하게 test해볼때 유용한것 같습니다.

http://git.busybox.net/busybox/

git clone git://busybox.net/busybox.git

---------------

BusyBox: The Swiss Army Knife of Embedded Linux

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.

BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add some device nodes in /dev, a few configuration files in /etc, and a Linux kernel.

BusyBox is maintained by Denys Vlasenko, and licensed under the GNU GENERAL PUBLIC LICENSE version 2.

---------------

웹에서 바로 test해볼수 있는 LIVE VM setup도 제공합니다. Javascript PC Emulator

http://busybox.net/live_bbox/live_bbox.html

BusyBox v1.20.0 (2012-04-22 12:29:58 CEST) multi-call binary.                   
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko              
and others. Licensed under GPLv2.                                               
See source distribution for full notice.                                        
                                                                                
Usage: busybox [function] [arguments]...                                        
   or: busybox --list[-full]                                                    
   or: busybox --install [-s] [DIR]                                             
   or: function [arguments]...                                                  
                                                                                
        BusyBox is a multi-call binary that combines many common Unix           
        utilities into a single executable.  Most people will create a          
        link to busybox for each function they wish to use and BusyBox          
        will act like whatever it was invoked as.                               
                                                                                
Currently defined functions:                                                    
        [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, 
        awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,        
        bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,      
        chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,    
        conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, 
        deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,      
        dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,            
        dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, 
        expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,    
        fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,  
        fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty,    
        grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid,    

        hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave,

        ifplugd, ifup, inetd, init, insmod, install, ionice, iostat, ip,        

        ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,         

        kbd_mode, kill, killall, killall5, klogd, last, less, linux32, linux64, 

        linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,       

        losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma,   

        lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,   

        mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat,       

        mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount,        

        mountpoint, mpstat, mt, mv, nameif, nanddump, nandwrite, nbd-client,    

        nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od, openvt, passwd,   

        patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill,     

        pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan,      

        pstree, pwd, pwdx, raidautorun, rdate, rdev, readahead, readlink,       

        readprofile, realpath, reboot, reformime, remove-shell, renice, reset,  

        resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake,           

        run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay, sed,    

        sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons,   

        setserial, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum,        

        showkey, slattach, sleep, smemcap, softlimit, sort, split,              

        start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd,   

        swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar,    

        tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top,    

        touch, tr, traceroute, traceroute6, true, tty, ttysize, tunctl,         

        ubiattach, ubidetach, ubimkvol, ubirmvol, ubirsvol, ubiupdatevol,       

        udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq, unix2dos,        

        unlzma, unlzop, unxz, unzip, uptime, users, usleep, uudecode, uuencode, 

        vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget, which,    

        who, whoami, whois, xargs, xz, xzcat, yes, zcat, zcip

---------------

Posted by 쁘레드
Programming2015. 5. 14. 02:04

파이썬으로 만든 open source web framework에 대한 introduction을 들었습니다. 재미있는 project인것 같습니다.


----------------------

https://github.com/Pylons/pyramid/


http://docs.pylonsproject.org/en/latest/

The Pylons Project

The Pylons Project maintains the Pyramid web framework as well as additional packages intended for use with Pyramid.



http://www.pylonsproject.org/

About Pyramid

Pyramid is a very general open source Python web framework. As a framework, its primary job is to make it easier for a developer to create an arbitrary web application. The type of application being created isn’t really important; it could be a spreadsheet, a corporate intranet, or a social networking platform. Pyramid is general enough that it can be used in a wide variety of circumstances.

Here's a very simple example of a Pyramid application.

from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response

def hello_world(request):
    return Response('Hello %(name)s!' % request.matchdict)

if __name__ == '__main__':
    config = Configurator()
    config.add_route('hello', '/hello/{name}')
    config.add_view(hello_world, route_name='hello')
    app = config.make_wsgi_app()
    server = make_server('0.0.0.0', 8080, app)
    server.serve_forever()

Tenets

Pyramid is developed using the following tenets.

Simplicity

Pyramid takes a "pay only for what you eat" approach. This means that you can get results even if you have only a partial understanding of Pyramid. It doesn’t force you to use any particular technology to produce an application, and we try to keep the core set of concepts that you need to understand to a minimum.

Minimalism

Pyramid concentrates on providing fast, high-quality solutions to the fundamental problems of creating a web application: the mapping of URLs to code, templating, security and serving static assets. We consider these to be the core activities that are common to nearly all web applications.

Documentation

Pyramid's minimalism means that it is relatively easy for us to maintain extensive and up-to-date documentation. It is our goal that no aspect of Pyramid remains undocumented.

Speed

Pyramid is designed to provide noticeably fast execution for common tasks such as templating and simple response generation. Although the “hardware is cheap” mantra may appear to offer a ready solution to speed problems, the limits of this approach become painfully evident when one finds him or herself responsible for managing a great many machines.

Reliability

Pyramid is developed conservatively and tested exhaustively. Where Pyramid source code is concerned, our motto is: "If it ain’t tested, it’s broke". Every release of Pyramid has 100% statement coverage via unit tests.

Openness

As with Python, the Pyramid software is distributed under a permissive open source license.

History

The code which exists today in Pyramid is not new. Between June, 2008 and November of 2010, it was known as repoze.bfg (see the BFG website for historical purposes).

When Pyramid was created in early December of 2010, a mass rename of code from repoze.bfg was performed and features were added to (and removed from) the resulting codebase to make it more useful for Pylons Framework 1.X users.


'Programming' 카테고리의 다른 글

Linux Kernel 공부, Open Source 링크  (0) 2015.06.01
Busybox - Swiss Army Knife of Embedded Linux  (0) 2015.05.22
Popcorn time Android App build for Lolllipop  (0) 2015.05.06
Python REST API framework EVE  (0) 2015.05.06
Linux Kernel Upgrade  (0) 2015.05.04
Posted by 쁘레드
Programming2015. 5. 6. 09:27

Install Android SDK or Android Studio

http://developer.android.com/tools/studio/index.html

-------------------------

$ echo "sdk.dir=YOUR_SDK_DIR" > local.properties

You can now sync, build and install the project:

$ ./gradlew assembleDebug # assemble the debug .apk
$ ./gradlew installDebug  # install the debug .apk if you have an
                          # emulator or an Android device connected

---------------------

Gradle?



https://gradle.org

-----------------------

gradle 특징

  • Gradle = Ant의 유연성 + Maven의 편리성을 조합해서 만든 빌드 시스템
  • 무료 (오픈 소스)
  • Java, Groovy, OSGi, 등의 프로젝트에서 빌드 관리 제공
  • API 제공
  • 확장성
  • 빌드의 구조화를 제공하고, Multi-Project 빌드를 쉽게할 수 있도록 제공
  • 다양한 방법으로 의존성 관리
  • Groovy DSL(Domain Specific Language) 기반
  • Groovy 기반으로 만들어서 Java 개발자가 쉽게 만들 수 있음 – 의존성 기반 프로그래밍을 위한 언어
  • 필요에 따라 프로그래밍 기법을 활용한 빌드 스크립트 작성
  • 빌드 스크립트는 기존 XML이 아닌 Groovy방식으로 작성
  • 필요한 빌드 로직을 조합하여 사용
  • Gradle Wrapper란 것이 있어서 실행하는 머신에 Gradle이 깔려있지 않아도 빌드 가능
  • 다른 툴과의 통합 및 Migration이 쉬움

-------------------

Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Disk quota exceeded

        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)

        at org.gradle.wrapper.Install.createDist(Install.java:47)

        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)

        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)

Caused by: java.io.IOException: Disk quota exceeded

        at java.io.FileOutputStream.close0(Native Method)

        at java.io.FileOutputStream.close(FileOutputStream.java:362)

        at java.io.FilterOutputStream.close(FilterOutputStream.java:160)

        at org.gradle.wrapper.Download.downloadInternal(Download.java:77)

        at org.gradle.wrapper.Download.download(Download.java:45)

        at org.gradle.wrapper.Install$1.call(Install.java:60)

        at org.gradle.wrapper.Install$1.call(Install.java:47)

        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)

        ... 3 more



'Programming' 카테고리의 다른 글

Busybox - Swiss Army Knife of Embedded Linux  (0) 2015.05.22
Python Web Framework - Pyramid  (0) 2015.05.14
Python REST API framework EVE  (0) 2015.05.06
Linux Kernel Upgrade  (0) 2015.05.04
ZeroMQ, ØMQ  (0) 2015.04.29
Posted by 쁘레드
Programming2015. 5. 6. 07:01

아 참 재밌는 프로젝트가 널려있네. 이렇게 high level언어들도 멋진 app들이 빠르게 구동된다니 정말 믿어지지 않을정도로 무섭습니다.


http://python-eve.org/

Python REST API Framework

Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully featured RESTful Web Services.

Eve is powered by FlaskRedisCerberusEvents and offers support for both MongoDB and SQL backends [*].

The codebase is thoroughly tested under Python 2.6, 2.7, 3.3, 3.4 and PyPy.

Eve is Simple

from eve import Eve

app = Eve()
app.run()

The API is now live, ready to be consumed:

$ curl -i http://example.com/people
HTTP/1.1 200 OK


20년간 MS Windows에서 programming했다는 이 사람 재밌네요.

E3550767c858c787c35c280047ff789c?s=47

Nicola Iarocci

10 Presentations

'Programming' 카테고리의 다른 글

Python Web Framework - Pyramid  (0) 2015.05.14
Popcorn time Android App build for Lolllipop  (0) 2015.05.06
Linux Kernel Upgrade  (0) 2015.05.04
ZeroMQ, ØMQ  (0) 2015.04.29
Install Ubuntu on VirtualBox  (0) 2015.04.27
Posted by 쁘레드
Programming2015. 5. 4. 04:28

Kernel upgrade with binaries (3.18.3)

 
Install the files now- 
$ sudo dpkg -i linux-headers-3.18.3*.deb linux-image-3.18.3*.deb


Update grub and reboot 

$ sudo update-grub

$ sudo reboot

 



Uninstall 3.18.3

sudo apt-get remove 'linux-headers-3.18.3*' 'linux-image-3.18.3*'


check linux kernel version

command -

$ uname
$ uname -a
$ uname -r

*Pre-requiste for kernel config


sudo apt-get install libncurses5-dev libncursesw5-dev


Git Clone and checkout to branch 3.18.3

http://stackoverflow.com/questions/28136815/linux-kernel-how-to-obtain-a-particular-version-right-upto-sublevel

# Clone the kernel to your local machine
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ cd linux-stable

# to check kernel version
$ make kernelversion
# Find the tag for the version you want
$ git tag -l | grep 3.18.3
v3.18.3

# Create a new branch with that tag
$ git checkout -b my3.18.3 v3.18.3


Build

Make menuconfig 

make

make -j8 ; -j for multi thread

make modules_install

make install


#or oneline command

make -j8 && make modules_install && make install



Make Boottable, and config bootloader(grub)

add new entry for new kernel

cd /boot

mkinitrd -o initrd.img -<kernelversion> <kernelversion>


???? 



'Programming' 카테고리의 다른 글

Popcorn time Android App build for Lolllipop  (0) 2015.05.06
Python REST API framework EVE  (0) 2015.05.06
ZeroMQ, ØMQ  (0) 2015.04.29
Install Ubuntu on VirtualBox  (0) 2015.04.27
Node.js 링크  (0) 2015.04.27
Posted by 쁘레드
Programming2015. 4. 29. 03:18

(ZeroMQ,ØMQ, 0MQ 계속 update되는 글입니다)


http://zguide.zeromq.org/page:all

https://github.com/zeromq/libzmq

http://www.slideshare.net/fedario/zero-mq-with-nodejs?related=1 ; ZeroMQ with NodeJS


FACT about ZMQ




'Programming' 카테고리의 다른 글

Python REST API framework EVE  (0) 2015.05.06
Linux Kernel Upgrade  (0) 2015.05.04
Install Ubuntu on VirtualBox  (0) 2015.04.27
Node.js 링크  (0) 2015.04.27
저렴한 Trace32, Low cost JTAG  (0) 2015.04.27
Posted by 쁘레드
Programming2015. 4. 27. 18:52

오라클Oracle VM VirtualBox로 리눅스 설치. 삽질해서 간단히 정리. 3군데만 잘 바꿔주면 됨. 전에도 했는데 잘 정리안하면 항상 손발이 고생함.

  

1. Floppy 없애고(이거 안하면 반응없던지 system이 계속 죽음)

  

2. 설치시 Ubuntu ISO골라 CD넣어주고

 

3. 네트웍은 Bridged Adapter로


TODOs

  • file share하기
  • copy & paste (shared clipboard)
  • 화면 해상도 flexible하게 하기


'Programming' 카테고리의 다른 글

Linux Kernel Upgrade  (0) 2015.05.04
ZeroMQ, ØMQ  (0) 2015.04.29
Node.js 링크  (0) 2015.04.27
저렴한 Trace32, Low cost JTAG  (0) 2015.04.27
토렌트, BitTorrent  (0) 2015.04.24
Posted by 쁘레드
Programming2015. 4. 27. 09:44

http://bcho.tistory.com/876 ; 장단점

http://bcho.tistory.com/870

http://imjuni.tistory.com/757



Node.js

Vert.x

내부 엔진 기반

Google Chrome V8 자바스크립트 엔진

libuv 기반의 비동기 처리 IO

Netty 기반의 NW IO

Hazel Case 기반 클러스터링

구현언어

C

Java

사용가능 언어

Javascript(애플리케이션), C (네이티브 모듈)

Python,JavaScript,Java,Groovy,Scala

외부 모듈

40,000개 이상

100개이하

클러스터링

한 하드웨어에 여러개 node.js를 띄울 수 있음. Node.js 인스턴스간 상태 Share 불가

한 하드웨어에 여러개의 vertx를 띄울 수 있음. node간의 상태 공유 메세징 가능
(HazelCast 기반)

에코시스템

매우 풍부레퍼런스,서적,교육,컨설팅 기관

공식 서적 2 (2권다 100페이지 이하))
컨설팅,교육 업체 없음

성능

열세
( node 인스턴스당 CPU 코어 1개 이상 사용이 불가함)

우세
(JVM 기반으로 하나의 vert.x인스턴스에 여러개의 verticle 인스턴스를 띄워서 CPU 사용률을 극대화 할 수 있음)



*IDE

http://www.nodeclipse.org/ ; eclipse

http://www.jetbrains.com/webstorm/ ; 유료 IDE


*Ebook

Node.js_recipes.pdf

Practical Node.js Building Real-World Scalable Web Apps.pdf

Pro iOS and Android Apps for Business with jQuery Mobile Node.js and MongoDB.pdf

Pro Node.js for Developers.pdf


*Lynda.comVideo


*Bower (package manager)

https://github.com/bower/bower

http://www.slideshare.net/lennymarkus/node-js-at-paypal?qid=bbea8ccc-5081-49d3-902d-51709f2b785f&v=qf1&b=&from_search=2 ; Node.js at Paypal

http://www.slideshare.net/clonncd/yeoman-a-nodejs-cli-tool-for-web-developers?qid=bbea8ccc-5081-49d3-902d-51709f2b785f&v=qf1&b=&from_search=9


*Grunt (javascript task runner)

http://www.slideshare.net/dougrdotnet/grunt-getting-started?qid=13f621ac-3bab-4786-be5a-d9aed4c6479d&v=default&b=&from_search=1

http://www.slideshare.net/brentswisher/building-your-own-personal-minion-with-gruntjs?qid=13f621ac-3bab-4786-be5a-d9aed4c6479d&v=default&b=&from_search=4

'Programming' 카테고리의 다른 글

ZeroMQ, ØMQ  (0) 2015.04.29
Install Ubuntu on VirtualBox  (0) 2015.04.27
저렴한 Trace32, Low cost JTAG  (0) 2015.04.27
토렌트, BitTorrent  (0) 2015.04.24
Web Sequence diagram blog에 넣기  (0) 2015.04.16
Posted by 쁘레드
Programming2015. 4. 27. 09:27

$80이면 JTAG를 살수있네요. Trace32로 알려진 Lauterbach에서 만든 HW debugger가 이 세상을 지배한지 20년쯤 됐나요? 많은 사람이 flash용으로 T32를 사용하지요. 진짜 debugging도 일년에 한번 쓸까말까인데, 매번 license를 upgrade하면서 너무 비싸다는 생각을 지울수가 없었습니다. IT회사에서 90% 수량은 이렇게 low cost로 바꾸고 T32도 기능적으로나 안정적으로나 우수한면이 있기때문에 소량만 사면 좋을것 같습니다.


아래 모델은 파워도 필요없고 USB에서 파워까지 끌어다 쓰는 low cost, low power 궁극의 embedded hw debugger(JTAG)입니다.


10여년전에도 MDS라는 한국회사라 이런것을 꿈꿨던것 같은데, 결국 적당한 타협점을 찾고 안주했을까요? 이런 시장에 명함도 못보겠네요.


http://www.tincantools.com/JTAG/Flyswatter2.html

Price:$89.00 
SKU600
Qty in Stock65
Weight1.00 lbs
Qty in Stock65




'Programming' 카테고리의 다른 글

Install Ubuntu on VirtualBox  (0) 2015.04.27
Node.js 링크  (0) 2015.04.27
토렌트, BitTorrent  (0) 2015.04.24
Web Sequence diagram blog에 넣기  (0) 2015.04.16
Popcorn Time clone해서 build하기  (0) 2015.04.14
Posted by 쁘레드
Programming2015. 4. 24. 22:16

http://en.wikipedia.org/wiki/Libtorrent

http://en.wikipedia.org/wiki/Distributed_hash_table

http://en.wikipedia.org/wiki/BitTorrent

http://www.libtorrent.org/streaming.html ; streaming

http://en.wikipedia.org/wiki/Bram_Cohen


https://github.com/rakshasa/rtorrent ; torrent client c++

http://sourceforge.net/projects/torrent-file-editor/?source=directory ; torrent file viewer and editor

http://sourceforge.net/projects/torrentfilehashchecker/?source=directory ; hash checker

http://sourceforge.net/projects/transmisson-remote-gui.mirror/?source=directory ; transmission torrent client, pascal


 distributed hash table (DHT라는 것이 2000년대 초반에 정부기관에서 펀드도 많이해주고 개발이 많이 됐었네요.

-----------------------

In 2001, four systems—CAN,[3] Chord,[4] Pastry, and Tapestry—ignited DHTs as a popular research topic. A project called the Infrastructure for Resilient Internet Systems (Iris) was funded by a $12 million grant from the US National Science Foundation in 2002.[5] Researchers included Hari Balakrishnan and Scott Shenker.[6] Outside academia, DHT technology has been adopted as a component of BitTorrent and in the Coral Content Distribution Network.







Streaming 지원은 은 2007년 부터 만들어졌다고 되어 있네요.

--------------

In general, BitTorrent's non-contiguous download methods have prevented it from supporting progressive download or "streaming playback". However, comments made by Bram Cohen in January 2007[11] suggest that streaming torrent downloads will soon be commonplace and ad supported streaming[12] appears to be the result of those comments. In January 2011 Cohen demonstrated an early version of BitTorrent streaming, saying the feature was projected to be available by summer 2011.[13] As of 2013, this new BitTorrent streaming protocol is available for beta testing.[14]


piece picking

This question is answered by torrent::request_time_critical_pieces() in libtorrent.

download queue time

timeouts

-----------------------


Podcast SW에서도 지원했었네요.

  • Podcasting software is starting to integrate BitTorrent to help podcasters deal with the download demands of their MP3 "radio" programs. Specifically, Juice and Miro (formerly known as Democracy Player) support automatic processing of .torrent files from RSS feeds. Similarly, some BitTorrent clients, such as µTorrent, are able to process web feeds and automatically download content found within them.


블리자드가 게임 download를 위해서도 썼다니.



'Programming' 카테고리의 다른 글

Node.js 링크  (0) 2015.04.27
저렴한 Trace32, Low cost JTAG  (0) 2015.04.27
Web Sequence diagram blog에 넣기  (0) 2015.04.16
Popcorn Time clone해서 build하기  (0) 2015.04.14
BAT/CMD windows script to EXE executable converter  (0) 2015.03.17
Posted by 쁘레드