Programming Tips

JS Yang's Blog


simple note -command line 버전 (sncli)by JSYang

  • install sncli https://github.com/insanum/sncli

  • urwid(Console user interface library for Python)

  • install urwid
    $wget https://pypi.python.org/packages/source/u/urwid/urwid-1.3.0.tar.gz
    $tar xvf urwid-1.3.0.tar.gz 
    $cd urwid-1.3.0/
    $python setup.py install
    
  • config sncli sncli pulls in configuration from the .snclirc file located in your $HOME directory. At the very least, the following example .snclirc will get you going (using your account information):
[sncli]
cfg_sn_username = lebowski@thedude.com
cfg_sn_password = nihilist
  • memo create
$sncli --title="abc" create
$sncli --title="abc" --content="abcdd" create
$sncli --title="abc" --file=/home/user/git/sncli/simplenote_cli/sncli.py create
Read More

My Haroopress settingsby JSYang

haroopress 를 자신의 repositoy 백업 하는 방법

  • rhiokim/haroopress 에서 수정한 내용을 자신만의 repository에 올리고 싶을 때

  • 자신의 github repository 로 fork

  • haroopress 가져오기

  1. nodo js 설치
  • source 디렉토리를 github 또는 bitbucket repository로 push.

  • source 디렉토리를 제외한 나머지 디렉토리를 github repository 로 push

  • ~/git/rhio/_deploy/.git/config 에서 remote “origin” 부분을 다음과 같이 고침.

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = git@github.com:reneezll/reneezll.github.io.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
Read More

linux packagesby JS Yang

  • alpine (command-line email client)

sudo apt-get install alpine

Read More

OPML parserby JS Yang

listparser: rss 주소들을 xml 포맷으로 저장한 파일(opml) 을 파싱해주는 클래스

*install setuptools(python)

https://pypi.python.org/pypi/setuptools

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

*install listparser

$git clone https://github.com/kurtmckee/listparser.git
$cd listparser
$sudo python setup.py install

사용법

import listparser

if __name__== '__main__':
    result =listparser.parse('/home/user/down/flym.opml')
    print 'length: '+ str(len(result.feeds))
    for i, item in enumerate(result.feeds):
        print item.url
Read More

github 에서 rhio/haroopress 를 fork하기by JSYang

  • github 에서 rhio/haroopress 를 fork하기

  • 이건 google 에서 검색하면 많이 나오므로 설명 생략

  • 자신의 haroopress repository으로 부터 git clone

$cd ~

$git clone git@github.com:reneezll/haroopress.git reneezll.github.io
  • backup config.js of mine
$mv config.js ~/config.js

$sudo make init
  • make init 시 submodule 에러 발생시
$git rm --cached source/data
$git rm --cached source/themes

중간에 사용자 입력은 아무거나

정적페이지 repository는 publishing 할 자신의 repository 입력

git@github.com:reneezll/reneezll.github.io.git

파일 소유권을 자신의 리눅스 계정으로 변경

$sudo chown -R user.user ~/reneezll.github.io
  • repository 입력을 잘못했을 경우,

_deploy/.git/config 의 url 을 수동으로 수정

  • config 복원.
$ cp -f ~/config.js ~/reneezll.github.io
  • 자신의 source repository 을 git clone
$cd ~/reneezll.github.io
$rm -rf source
$git clone git@bitbucket.org:hades_yan/haroopress_source.git source
  • 앞으로 수정사항은

  • source 디렉토리-> git@bitbucket.org:hades_yan/haroopress_source.git
  • source 를 제외한 haroopress framework -> git@github.com:reneezll/reneezll.github.io.git 에 push

  • push 방법
$git add --all
$git commit -m'add angularjs'
$git push -u origin master 
  • 웹페이지 올리기
make deploy
Read More
Load More…