Search This Blog

Sunday, July 21, 2013

Post on Blogspot using cURL with bash

The following bash-script posts an article in the blogspot.


# Authenticate
# Requires $GDATA_PASSWORD to be set as an environment variable.
G_AUTH_TOKEN=`curl 2>/dev/null \
    -d \
    -d Passwd=$GDATA_PASSWORD  \
    -d accountType=GOOGLE \
    -d source=curlExample \
    -d service=blogger \
  | grep '^Auth=' | cut -c 6-`

# Post on my blog.
curl -v --request POST -H "Content-Type: application/atom+xml" \
    -H "Authorization: GoogleLogin auth=$G_AUTH_TOKEN" \
    "" --data "@blog_post.xml"

The followings are the field specific for a user account and a blog. user account for a blog
$GDATA_PASSWORD: user password
YOUR_BLOGS_ID: blog id
blog_post.xml: data for upload

The following is an xml example to upload.

<entry xmlns="">  
  <title type="text">Knock knock</title>  
  <content type="xhtml">  
    <div xmlns="">  
      <p>Who's there?</p>  
      <p>Orange who?</p>  
      <p>Orange you glad you know how to post using curl?!? (lol!)</p>  
  <category scheme="" term="joke"/>  
  <category scheme="" term="curl"/>  

In this xml, category scheme defines labels.

Code formatter:

Friday, July 19, 2013

How to use 'wget' for ''

1. Export cookie for ''. Let's name it 'cookie.txt'.
2. Run the following code

wget -c --load-cookies cookie.txt "address to download" -O savefilename

Wednesday, July 17, 2013

Yamaha Zuma 2t oil

- Yamalube

2R - High performance 2-stroke blend
2W - Semi-synthetic formula for sport boats & waverunner, not recommended for 2-stroke land-use vehicles or outboard motors
2S - Semi-synhtetic base and additive 2-stroke engine oil
2M - Outboard semi-synthetic engine oil

2R is known for premix, while 2S for injection.

- AMSOil

Dominator Synthetic 2-Cycle Racing Oil

- Summary of 2-stroke oil

TC-W3 is an outboard specific oil, so not recommended for mopeds.
API-TC, based in the USA, is using metal-based, ash-producing additives.
JASO-FD and ISO-L-EGD would be best for mopeds.

Some JASO-FD and ISO-L-EGD injection type oils
Ipone Scoot City
Ipone Scoot Run

Blog Archive