Short how-to:
code>
root@215003:~# mysql -u root -p
Enter password:
mysql> CREATE DATABASE s_db;
mysql> GRANT ALL PRIVILEGES ON s_db.* to 's_user'@'localhost' IDENTIFIED BY '12345678';
mysql> FLUSH PRIVILEGES;
mysql>exit
mysql -u s_user -p s_db < database.sql
<
“I have to say, I’m not a big fan of cloud computing” by Drew Dernavich/ The New Yorker 2.07.2011/
Here it is ( with user name, password, database host and db name ) :
mysql -uuser_name -ppassword -hmysql_host_server_.domain.com -Ddatabase_name < database_commands.sql
Interesting poll in linkedin – results ( as expected ) – Android is first :
- AWS Case Study: U.S. Department of State – ExchangesConnect Video Contest
- RESTful Services with Erlang and Yaws : wting RESTful web services in Erlang/YAWS
- Amazon moves VMware’s virtual machines to the cloud, blog post on AWS :VM Import – Bring Your VMware Images to The Cloud
- Android vs iPhone: Security Models
- Hudson Project Renames to Jenkins – also see Hudson’s future on hudson-labs.org, On Oracle proposal about Hudson by Kohsuke Kawaguchi
- Skype architecture
- Real customers feedback on Agile
- Amazon’s Android Appstore : Amazon launches Android appstore portal, Amazon’s Disruptive Android App Store Now Open To Developers — Full Details, Deciphering Amazon’s Android App Store Strategy
- The coolest open source databases on the planet (NOSQL + RDBMS)
- NoSQL at twitter
- The experiment infrastructure at Google
- Chrome Release Cycle
- Google presented Android 3.0 ( Honeycomb ) on LG /G-Slate device: What’s Hiding Inside Android’s Honeycomb?, and LG and T-Mobile’s G-Slate Tablet To Run Android 3.0 Honeycomb, demo videos from CES :CES 2011: T-Mobile G-Slate Honeycomb LG Tablet Hands-on Videos – Features Walkthrough in 8 New Videos
- Korea : Telecoms bet on cloud computing – SK telecom announced cloud data center for mid- and small-business, other players – KT Corp. and LG Uplus also announced their plans last year to jump into competition.
- CloudBees announced HaaS : Hudson as a Service ( free accounts still available )
- Sony announced ( actually in Nov/2010 ) Sony’s next-gen app platform will use Objective-C/GNUstep: SNAP. By the way Sony got some open source stuff : Sony products with Linux / OSS embedded Technology.
Below I put some snapshots from Googl’e chrome release cycle presentation with some comments.
Continue reading ‘Links for January 2011’ »
- Open Source Search with Lucene & Solr
- Lucene Near Realtime Search
- LinkedIn Search & Lucene
- Distributed Scoring For Lucene Implementation
- Twitter’s New Search Architecture
- Real time search – Billions quieries per day
- Distributed lucene – Katta project
- Does iTunes use Lucene for search?
- Index Server Project Proposal
- NRS – Near Real time search with Lucene
- Solr’s distributed search
- Effective Smoothing for a Terabyte of Text
- Zoie – real time search and indexing based on Lucene
- Distrubuted lucene index on top of Cassandra : Lucandra = Lucene + Cassandra
For those who like to use Azure instead of AWS :
Guys from EC2 announced micro instances – it costs 2 (two) cents per hour for linux and now it’s will costs less than traditional dedicated hosting with root access – monthly payment for EC2 micro instance will be about 15 USD, and price for root/linux on dedicated hosting will be about 30 USD/month. It’s really good news – you can have 100 boxes cluster just for two usd per hour! Bad thing is that micro instances don’t have their own disk space – EBS only, looks like this best ever use case for this type of instances will be highly-distributed computational grid with all data stored in RAM. And don’t forget that EBS will costs you some money – $0.10 per allocated GB per month Amazon EBS also charges $0.10 per 1 million I/O requests you make to your volume . Fredrick Poller’s already check out micro instances performance by sysbench : Amazon EC2 Micro instance, how fast is it?.
By unknown reasons Sun JDK was moved to partner repository, so to use sun jdk you need to do this steps
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get upgrade
and then enjoy :
sudo apt-cache search jdk | grep sun
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6
sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)
- Shanghai releases 3-year cloud computing plan – Shanghai plans to use cloud computing technologies in urban management, industry development, e-government and small and medium-sized enterprise services
AWS related links :
- State of the cloud – 2010 August
- Amazon’s EC2 Generating 220M+ Annually – really interesting post – “at 40,000 servers evenly distributed across 6 availability zones we know, ___ 6,700 servers per zone..Most of the servers are likely in the US availability zones vs. the EU zones, maybe 75-80% of total capacity”. Also take a look on amazon ec2 instances usage rates
- Anatomy of an Amazon EC2 Resource ID and based on this anatomy EC2 usage estimates
- Rumor Mill: Google EC2 Competitor Coming in 2010?
You can use sed :
sed -e 's/\([^\d]*\)/\L\1/' in.txt > out.txt
or perl inliner :
.
perl -ne 'utf8::decode $_; $_ = lc $_; utf8::encode $_; print' in.txt > out.txt
Both guys works fine for unicode file too.
Using telnet in bash scripts to automate some stuff ? It’s really easy, here’s an example to tell “hello world” on telnet server :
req="hello world"
server="my_server 1234"
val=`( echo open ${server}
sleep 3
echo "${req}"
sleep 1 ) | telnet`
echo $val
Okay, we have text file with list of urls and want to have firefox’s screenshots from this pages and also we need to have this screenshots in some normalized resolution ( like all images should be in 300×400 – thumbnails ). First of all you need to install Command line print Firefox add-on. Then create some simple script which will run firefox with needed url, print screenshot and close ( in my case via kill – may be it’s too brutal ) firefox in cycle. It may look like this ( url_list.txt – file with urls – each url on its own line :-)), after running this script you will have many *.png files which is screenshots for ulrs – 0.png – for first url in urls_list.txt, 1.png for second and so on.
#!/bin/bash
id=0
while read line
do
firefox -print $line -printmode png -printdelay 10 -printfile ${id}.png
ps ax | grep firefox | awk '{ print $1 }' | xargs kill -9 ;
id=$[$id+1]
done < urls_list.txt
And now then we have screenshots ( all this guys are in different resolution in common ) then we need to normalize them – to create thumbnails for all images in 300×400 resolution – convert helps!
for f in *.png;
do
convert -thumbnail 300x400! ${f} thumb_${f}
done
And we have many thumb_*.pn with 300×400 resolution all. A little note – using resolution without ! sign will work in another way – resize will be processed proportionally with using resize only for one dimension ( bigger one ).
GIT
- git for big files : git-bigfiles
- omit large files commiting into git repo : Rejecting large files in git
- git as backup system : A better backup system based on Git and Journey to a backup solution: Git
- Hosting Git repositories, The Easy (and Secure) Way
Subversion ( svn )
- How to store-all-stuff-in-svn : Subverting your homedir, or keeping your life in svn
- SVN-Hooks : Avoid empty comment in SVN commits
- Using SVN-Hooks to commit notifications on email : Setting up a post-commit mail notification for a Subversion repository
- SVN Notify documentation