In my apartment we had pppoe connection that I could configure with “
sudo pppoeconf“. However, when I moved to a new place where a direct connection was provided without pppoe, my network settings didn’t work. My laptop still wanted to connect through pppoe… I tried to execute
pppoeconf again, but it said “no pppoe is available”. Great!
Remove pppoe settings manually. First, edit
/etc/network/interfaces and comment out the pppoe part:
auto lo iface lo inet loopback # auto dsl-provider # iface dsl-provider inet ppp # pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf # provider dsl-provider auto eth0 iface eth0 inet manual
Then change the last line from
iface eth0 inet dhcp
Remove the file
/etc/ppp/peers/dsl-provider. Finally, restart networking: “
sudo /etc/init.d/networking restart“.
This tip was taken over from here.
When you visit a subreddit on reddit.com, for instance http://www.reddit.com/r/python, at the bottom of the page you will find just a “next” link to the next page. Needless to say, browsing older entries like that is a PITA…
I made a simple script that generates a static HTML page with links to all the older pages:   …
You can find the script
reddit_get_all_pages.py in my Bash-Utils collection, in the
Customize the constant
This script made me figure out that reddit lists only the last 1000 posts! Older posts are hidden. If you have a direct link to them, fine, otherwise they are gone :( So this script will only list 40 pages. This is a limitation of reddit.
If you used DOS, you must have had Norton Commander on your machine, which was the first orthodox file manager. The first version was released in 1986.
Today I learned that there exists Norton Commando too, which was a British made motorcycle with a twin cylinder engine, produced by the Norton Motorcycle company. During the ten years it was in production it was popular all over the world. In the United Kingdom it won the MCN “Machine of the Year” competition for five successive years from 1968-1972. Some regard it as the British Motorcycle Industry’s swan song, selling well from its introduction in 1967 through the end of the British bike industry as a commercial concern in the mid 1970s. (from wikipedia)
“Marakana‘s raison d’être is to help people get better at what they do professionally. We accomplish this by organizing software training courses (both public and private) as well as publishing learning resources, sharing knowledge from industry leaders, providing a place to share useful tidbits and supporting the community. Our focus is open source software.”
You have an unreadable JSON file from which you want to extract some data… How to prettify it, i.e. how to make it human readable?
There are web-based and command-line solutions. As an extra, we show you how to do it in Vim too.
- http://chris.photobooks.com/json/default.htm (it can show you the path of a tag too)
- http://jsonformatter.curiousconcept.com/ (formatter and validator)
curl -s http://www.reddit.com/r/nsfw/.json | python -mjson.tool
sudo apt-get install edit-json; prettify_json myfile.json
This tip is based on this post: Editing json files in vim.
.vimrc file I had to add the following lines:
" pretty-print JSON files autocmd BufRead,BufNewFile *.json set filetype=json " json.vim is here: http://www.vim.org/scripts/script.php?script_id=1945 autocmd Syntax json sou ~/.vim/syntax/json.vim " json_reformat is part of yajl: http://lloyd.github.com/yajl/ autocmd FileType json set equalprg=json_reformat
When opening a
.json file, it will be colored using the
json.vim syntax file. Selecting a text and pressing the “
=” button will indent the marked text using
There are several JSON visualizer add-ons for Firefox, e.g. JSONView.