<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ssh &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Sun, 20 Jun 2010 13:14:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>ssh &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>iPhone &#038; Ubuntu notes&#8230;</title>
		<link>https://blog.sephiroth.it/2008/03/29/iphone-ubuntu-notes/</link>
					<comments>https://blog.sephiroth.it/2008/03/29/iphone-ubuntu-notes/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 29 Mar 2008 08:14:32 +0000</pubDate>
				<category><![CDATA[general]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=247</guid>

					<description><![CDATA[No Flash stuff this time &#240;&#159;&#153;&#130; During my last trip to New York city I finally decided to buy an iPhone for me too (I think I have everything from Apple right now.. except a mac &#240;&#159;&#153;&#130; ). The most annoying thing for a linux user like me is obviously the fact that the iPhone &#8230; <a href="https://blog.sephiroth.it/2008/03/29/iphone-ubuntu-notes/" class="more-link">Continue reading <span class="screen-reader-text">iPhone &#038; Ubuntu notes&#8230;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.sephiroth.it/wp-content/uploads/2008/03/IMG_0025.jpg"><img decoding="async" class="alignleft size-thumbnail wp-image-1085" style="margin: 4px;" title="IMG_0025" src="https://blog.sephiroth.it/wp-content/uploads/2008/03/IMG_0025-150x150.jpg" alt="" width="150" height="150" /></a>No Flash stuff this time 🙂<br />
During my last trip to New York city I finally decided to buy an iPhone for me too (I think I have everything from Apple right now.. except a mac 🙂 ).<br />
The most annoying thing for a linux user like me is obviously the fact that the iPhone syncronization should pass from iTunes, which is not available for linux&#8230;<br />
Ok, there are some ways indeed to copy music like this: <a title="iphone and ubuntu" href="http://help.ubuntu.com/community/PortableDevices/iPhone" target="_blank">http://help.ubuntu.com/community/PortableDevices/iPhone</a>, but as you can see is not so smart.</p>
<p>Sync your address book isn&#8217;t easy too. The AddressBook sqlite can be easily browse using an SQLite browser such as SQLite Database Browser http://sqlitebrowser.sourceforge.net/, just get the AddressBook.sqlitedb (it&#8217;s into  /private/var/mobile/Library/AddressBook/)  from the iphone via sftp (just remember to install <span style="font-weight: bold;">BSD Subsystem</span> and <span style="font-weight: bold;">OpenSSH</span>) and call a simple query like this:<br />
<code>SELECT t1.First, t1.Last, t2.value from ABPerson as t1, ABMultiValue as t2 WHERE t2.record_id = t1.ROWID</code><br />
For a full AddressBook sync you can read more here: <a title="linux addressbook iphone syncronization" href="http://www.estamos.de/blog/2007/10/29/iphone-address-book-synchronization-with-syncevolution-the-making-of/" target="_blank">http://www.estamos.de/blog/&#8230;the-making-of/</a></p>
<p>Another tip I just discovered is how to upload into the iPhone my own Ringtones.<br />
First convert the mp3 file into an M4R file using this command line script:<br />
<code>mplayer -ao pcm input_file.mp3 -ao pcm:file="~temp.wav"<br />
faac ~temp.wav -o output_file.m4r -w<br />
rm ~temp.wav</code><br />
then using sftp put the output_file.m4r into /Library/Ringtones directory. A sample workflow can be this one:<br />
<code>~/iphone/Ringtones$ mplayer -ao pcm The_Spell.mp3 -ao pcm:file="~temp.wav"<br />
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team<br />
CPU: Intel(R) Core(TM)2 CPU         T7600  @ 2.33GHz (Family: 6, Model: 15, Stepping: 6)<br />
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1<br />
Compiled with runtime CPU detection.<br />
mplayer: could not connect to socket<br />
mplayer: No such file or directory<br />
Failed to open LIRC support. You will not be able to use your remote control.<br />
Playing The_Spell.mp3.<br />
Audio file file format detected.<br />
Clip info:<br />
Title: The Spell<br />
Artist: Lunatica<br />
Album: Fables &amp; Dreams<br />
Year: 2004<br />
Comment:  00001A75 000016D0 00004374<br />
Track: 6<br />
Genre: Other<br />
==========================================================================<br />
Forced audio codec: mad<br />
Opening audio decoder: [libmad] libmad mpeg audio decoder<br />
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000-&gt;176400)<br />
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)<br />
==========================================================================<br />
[AO PCM] File: ~temp.wav (WAVE)<br />
PCM: Samplerate: 44100Hz Channels: Stereo Format s16le<br />
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast<br />
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).<br />
AO: [pcm] 44100Hz 2ch s16le (2 bytes per sample)<br />
Video: no video<br />
Starting playback...<br />
Cannot sync MAD frame 538.0 (08:58.0)  0.8%<br />
Cannot sync MAD frame<br />
Cannot sync MAD frame<br />
Cannot sync MAD frame 538.0 (08:58.0)  0.8%<br />
A: 288.3 (04:48.2) of 538.0 (08:58.0)  0.8%<br />
Exiting... (End of file)<br />
alessandro@alessandro-u-laptop:~/iphone/Ringtones$ faac ~temp.wav -o The_Spell.m4r<br />
Freeware Advanced Audio Coder<br />
FAAC 1.26.1 (Jan 22 2008) UNSTABLE<br />
Quantization quality: 100<br />
Bandwidth: 16000 Hz<br />
Object type: Low Complexity(MPEG-2) + M/S<br />
Container format: Transport Stream (ADTS)<br />
Encoding ~temp.wav to The_Spell.m4r<br />
frame          | bitrate | elapsed/estim | play/CPU | ETA<br />
12388/12388 (100%)|  137.8  |   12.5/12.5   |   22.95x | 0.0<br />
alessandro@alessandro-u-laptop:~/iphone/Ringtones$ sftp root@192.168.1.203<br />
Connecting to 192.168.1.203...<br />
root@192.168.1.203's password:<br />
sftp&gt; cd /Library/Ringtones<br />
sftp&gt; put The_Spell.m4r</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2008/03/29/iphone-ubuntu-notes/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Backup your batabases w/o phpmyadmin</title>
		<link>https://blog.sephiroth.it/2006/04/06/backup-your-batabases-wo-phpmyadmin/</link>
					<comments>https://blog.sephiroth.it/2006/04/06/backup-your-batabases-wo-phpmyadmin/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Thu, 06 Apr 2006 18:35:46 +0000</pubDate>
				<category><![CDATA[general]]></category>
		<category><![CDATA[7-zip]]></category>
		<category><![CDATA[bzip2]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=135</guid>

					<description><![CDATA[I often read threads about export/import data from MySQL and it&#8217;s always mentioned phpmyadmin as the only way to do that (with PHP indeed). But that&#8217;s not true, and it&#8217;s indeed the slower way to do that, expecially when importing large database files (because phpmyadmin has problems with large db)&#8230; This would be just a &#8230; <a href="https://blog.sephiroth.it/2006/04/06/backup-your-batabases-wo-phpmyadmin/" class="more-link">Continue reading <span class="screen-reader-text">Backup your batabases w/o phpmyadmin</span></a>]]></description>
										<content:encoded><![CDATA[<p>I often read threads about export/import data from <a href="http://www.mysql.com">MySQL</a> and it&#8217;s always mentioned <a href="http://www.phpmyadmin.net/home_page/">phpmyadmin</a> as the only way to do that (with PHP indeed).<br />
But that&#8217;s not true, and it&#8217;s indeed the slower way to do that, expecially when importing large database files (because phpmyadmin has problems with large db)&#8230;<br />
This would be just a reminder 🙂<br />
Use an <span style="font-weight: bold;">SSH client</span>, like <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">putty</a> (if your database is on a remote server), to connect to your server and export the databse you want simply with:</p>
<p class="tutorialCode"><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html"><strong>mysqldump</strong></a><strong> &#8211;user=username &#8211;password=1234 &#8211;databases your_database &#8211;opt &#8211;quote-names &#8211;allow-keywords &#8211;complete-insert | bzip2 -c &gt; your_database.sql.bz2</strong></p>
<p>download the .bz2 file created, unzip it using <a href="http://www.7-zip.org/">7-zip</a> (if you dont have any other uncompress utility), and backup your database in mysql using:</p>
<p class="tutorialCode"><strong>mysql &#8211;user=username &#8211;password your_database &lt; your_database.sql</strong></p>
<p>that&#8217;s faster than using &#8220;import&#8221; from phpmyadmin<br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html">http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2006/04/06/backup-your-batabases-wo-phpmyadmin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
