dd(8)-written disk has ~800MB of NULs

2022-08-27 Thread Daniel Shahaf
Subject: dd(8)-written disk has ~800MB of NULs

tl;dr: I dd(8)'d a partition to a HD in an external enclosure, then
cmp(1)'d to verify the copy, and found 800MB of NULs in the target of
the copy; I'm trying to figure out what went wrong and whether I can
trust the enclosure and HD the data was written to.

---

What happened:

I booted a host from a live USB [debian buster, kernel 4.19.67-2+deb10u1]
and used dd(8) to copy one of the host's partitions to a 3.5" SATA disk
in an external USB3.0 enclosure [vid 2109 pid 0711, quirks US_FL_NO_ATA_1X].
The enclosure is connected via two USB cables (the manufacturer's USB 3
B–A cable and a 3m USB A extension cable) and has its own 220V power
supply.

The partition in question is ~700GB.  It wasn't mounted at the time.

The argument to dd(8)'s of= option was a partition on the target disk,
not a regular file.

dd(8) processed data at 26MB/s.  (IIRC, I didn't specify any bs= argument.)

dd(8)'s exit code was zero.

I turned off the host and the next day, in the same live environment,
cmp(1)ed the source and target partitions.  cmp(1) found a difference
about 20% of the way in.  A closer look revealed that 192774 4096-byte
blocks (about 770MB) in the middle of the target partition contained
only NULs.  Other than those NULs, the target partition was identical
to the source partition.  I have now re-written those 800MB, which
succeeded.  Reading them back succeeded too and they compare equal
to the source partition.

SMART status of the source disk is clean.  I can't get SMART status of
the target disk easily (that's unsupported by the enclosure).

---

I'm not sure what to make of that.  It seems like dd(8) silently failed
to write 800MB of data.

The target partition is in an area of the target drive that was likely
never used before.  It's possible all-NULs is what those 771MB contained
before the dd(8) run.  Thus, two possibilities: either the sectors
weren't written to at all, or they were written to with NULs rather than
with the correct data.

---

I'd like to understand what caused the silent write failure so I can
ensure it won't happen again, and more importantly, so I can ensure
disks I write will be readable when I need them.

What should be my first suspect here?  A hardware issue?  What part of
the setup should I look at first?

What should I do to make sure the data will be readable?  If I verify
the data after writing it [e.g., by cmp(1) to a known-good copy, or by
verifying PGP signatures], does that ascertain that the data will be
readable /in the future/ assuming the drive is kept in storage in the
meantime?

Cheers,

Daniel

P.S.  I have another, verified backup of that partition, as well as
a non-block-level backup of it, so no need to worry about that partition.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Installation report: Bootstrapping a first installation bootable USB

2022-07-13 Thread Daniel Shahaf
Thank you both for the suggestions; I'll keep them in mind next time.

(For the time being, I have a bootable disk for my friend so I'm all set.)

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Installation report: Bootstrapping a first installation bootable USB

2022-07-13 Thread Daniel Shahaf
I tried to walk a friend through using Windows 10 to create a bootable
Linux USB disk, so they'd install their first Linux box.

Debian (and FreeBSD) recommend win32diskimager.  Arch suggested a few
other tools, of which I tried Rufus 3.19 and "dd for windows".  The
first and third didn't work at all; the second worked once but not again
on the same image.

Rather than try a fourth tool, I went ahead and created the bootable USB
disk for my friend myself using good old dd(8) on one of my existing
Linux machines.

Now I wonder how a random Windows user is supposed to bootstrap
themselves a bootable Linux USB disk.  Perhaps my experience is not
representative.

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: recover ssh-agent socket

2022-01-08 Thread Daniel Shahaf
Tzafrir Cohen wrote on Sat, 08 Jan 2022 09:06 +00:00:
> I accidentally deleted my ssh-agent's socket from /tmp. The agent is
> still running and I have $SSH_AGENT_PID and $SSH_AUTH_SOCK set in
> various processes, so I know where it should have been.
>
> Is there any way to recover the socket? Short of restarting the X
> session, of course.

Could you just spawn a new ssh-agent instance and have it use
$SSH_AUTO_SOCK as the name of the socket, and re-add private keys to it?
$SSH_AGENT_PID would still point at the old instance, sure, but what
would that break?

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Python on Ubuntu 18.04.6 LTS

2022-01-03 Thread Daniel Shahaf
אורי wrote on Tue, 04 Jan 2022 04:07 +00:00:
> Are there powers of 2 which give exactly 10% of each of the digits 0 to 9 (in
> decimal form)?

No, because then the sum of the digits would be a multiple of nine, so the
number wouldn't be a power of two.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Got an SPF report, am I reading this right?

2021-12-23 Thread Daniel Shahaf
אורי wrote on Thu, 23 Dec 2021 14:49 +00:00:
> I suggest that you use/create a Gmail account, send yourself mail the way
> you usually send it and check the headers from there.

I just did basically that.

My copy of my post to this list a few minutes ago shows as dkim=fail
on my end.  My copy of a post I made to another list a few minutes
before that shows as dkim=pass on my end.  By "My copy" I mean the
copy of the post I received through the list.  The two posts were sent
the same way.

I suspect the list's footer breaks the DKIM-Signature body hash (bh=)
verification.

Cheers,

Daniel

> For example if I
> check a mail I receive from my server (sent automatically), I receive
> the following messages:
>
> SPF: PASS with IP 69.169.224.10 Learn more
> DKIM: 'PASS' with domain amazonses.com Learn more
>
> You may consider sending your mail via an external email provider, such as
> Amazon SES. I use them and they are very reliable.
>
> Thanks,
> אורי
> u...@speedy.net
>
>
> On Thu, Dec 23, 2021 at 4:01 PM Ira Linux Abramov <
> lists-linux...@ira.abramov.org> wrote:
>
>> Hey gang,
>>
>> I have added SPF record for my domains about 2 years ago and kinda
>> forgot about it. I get a lot of reports about spam received "from my
>> domain" but not from my servers. almost 50% from google, and I assume
>> that's because half the world in on gmail...
>>
>> however today I found a report from an Israeli domain for the first
>> time, the OpenU server sent me the following report and I'm not happy
>> about what I am reading here. if I read it correctly, someone at
>> openu.ac.il got an email I sent through this list but it is rejected
>> because the DKIM is broken. If that is true there is something wrong
>> with the way the huji mail server is adding the sig at the bottom, or
>> something else is breaking the message, which suggests using SPF records
>> may be more harmful than helpful, plus the huji server is not configured
>> correctly to prevent DKIM breakage.
>>
>> Anyone got insights?
>>
>> 
>> 
>>1.0
>>
>>  openu.ac.il
>>  mailer-dae...@openu.ac.il
>>  
>>  8e1971$6c419ec=9144b8f822523...@openu.ac.il
>>  
>>1640124003
>>1640210403
>>  
>>
>>
>>  ira.abramov.org
>>  r
>>  r
>>  none
>>  
>>  100
>>
>>
>>  
>>132.65.116.210
>>1
>>
>>  none
>>  fail
>>  fail
>>
>>  
>>  
>>ira.abramov.org
>>cs.huji.ac.il
>>  
>>  
>>
>>  ira.abramov.org
>>  dkim
>>  permerror
>>
>>
>>  cs.huji.ac.il
>>  mfrom
>>  none
>>
>>  
>>
>> 
>>
>> ___
>> Linux-il mailing list
>> Linux-il@cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Floppy disks at 2021?!

2021-12-23 Thread Daniel Shahaf
Ira Linux Abramov wrote on Thu, 23 Dec 2021 14:11 +00:00:
> On 2021-12-22 22:48, Daniel Shahaf wrote:
>> If it's IDE you might be able to connect a CF card to the old computer
>> with a CF<->IDE adapter?  Not sure if a 1997 vintage IDE controller
>> would be up to this.
>> 
>
>
> floppy controllers are not IDE. different connector, different 
> everything. also in the kernel it is a different major device number, 
> and the names are fd0, fd1, not hda, hdb.

I wasn't thinking of connecting a CF card to the old computer's floppy
controller.  I was rather thinking of connecting a CF card to the old
computer's IDE controller, in parallel to the existing IDE disk, to get
the contents of that computer's hard drive: i.e., copy from hda to hdb
where hdb is actually a CF card.

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Floppy disks at 2021?!

2021-12-22 Thread Daniel Shahaf
If it's IDE you might be able to connect a CF card to the old computer
with a CF<->IDE adapter?  Not sure if a 1997 vintage IDE controller
would be up to this.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: diff

2021-12-14 Thread Daniel Shahaf
אורי wrote on Tue, 14 Dec 2021 15:32 +00:00:
> אורי
> u...@speedy.net
>
>
> On Tue, Dec 14, 2021 at 5:22 PM Daniel Shahaf 
> wrote:
>
>> אורי wrote on Tue, 14 Dec 2021 07:44 +00:00:
>> > Actually I prefer the "<(..)" method, because sometimes I want to
>> compare 2
>> > commands:
>> >
>> > diff <(pip freeze | sort) <(cat requirements.txt | sort)
>> >
>>
>> Consider s/diff/comm -12/.
>>
>
> ???

s/foo/bar/ means "change foo to bar".  In this case, I was referring you
to comm(1).  Your use-case there is right up comm(1)'s alley.

«-12» is an argument to to comm(1).

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: diff

2021-12-14 Thread Daniel Shahaf
אורי wrote on Tue, 14 Dec 2021 07:44 +00:00:
> Actually I prefer the "<(..)" method, because sometimes I want to compare 2
> commands:
>
> diff <(pip freeze | sort) <(cat requirements.txt | sort)
>

Consider s/diff/comm -12/.

> Or even use cat and echo to add a specific line to one of the outputs. If I
> want the result to be completely null. For example to run in crontab and
> send me mail whether it's not null.

Careful here.  By default, cron jobs run not under your login shell but
under /bin/sh, and it's possible the latter doesn't support «<(…)» even
if the former does.

Cheers,

Daniel


> אורי
> u...@speedy.net
>
>
> On Tue, Dec 14, 2021 at 9:31 AM Eli Marmor  wrote:
>
>> Use "-" instead the file name of one of both of the files, and pipe your
>> output to the diff command.
>>
>> ‪On Tue, 14 Dec 2021 at 09:12, ‫אורי‬‎  wrote:‬
>>
>>> Thank you.
>>>
>>> אורי
>>> u...@speedy.net
>>> ___
>>> Linux-il mailing list
>>> Linux-il@cs.huji.ac.il
>>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>>
>>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: strange problem with digits in Libreoffice

2021-07-09 Thread Daniel Shahaf
Perhaps it's a font issue?  Screenshot the "שלום 3 2 1" on both
computers and check whether the digits are from the same font?  Try
pdftotext on the PDF and see it emits digits?  Diff the list of
installed packages (`dpkg -l`) on the two machines?  Try running
libreoffice under a new user to rule out ~/.* configuration?
A difference in /etc or debconf choices seems unlikely.

Hope this helps — even if it's just a bunch of shots in the dark…

Cheers,

Daniel



Shlomo Solomon wrote on Thu, 08 Jul 2021 14:11 +00:00:
> I have a problem in Libreoffice.
> 
> If I type 123, that's what I see in the document.
> 
> But if I type:  שלום 123
> I see:שלום 3 2 1 - extra spaces between the digits.
> 
> This only happens in Hebrew, so  hello 123 is OK.
> 
> But there are no "real" spaces since I cannot delete them.
> 
> Even stranger - If I export to a PDF, there are no digits!!
> 
> 
> I have 2 Kubuntu machines running the same version of Libreoffice
> (6.4.7.2). As far as I know both are configured the same, but I assume
> that there is some subtle difference that I'm missing since this problem
> occurs on only one of them.
> 
> BTW - this only started recently, but I don't know exactly when (It's
> my wife's computer and she didn't notice it).
> 
> -- 
> Shlomo Solomon
> http://the-solomons.net
> Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04
> 
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> 

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Mail blocked by Google

2021-05-17 Thread Daniel Shahaf
Vordoo wrote on Sun, 16 May 2021 11:28 +00:00:
> On 5/16/21 6:48 AM, אורי wrote:
> > May 16 04:00:01 www postfix/smtp[1364]: 79264BD01C: 
> > to= > >, 
> > relay=aspmx.l.google.com[142.250.27.27]:25, delay=0.13, 
> > delays=0.02/0.01/0.02/0.07, dsn=5.7.1, status=bounced (host 
> > aspmx.l.google.com[142.250.27.27] said: 550-5.7.1 [157.245.76.159  18] 
> > Our system has detected that this message is 550-5.7.1 _*likely suspicious 
> > due to the very low reputation *_of the sending IP 550-5.7.1 address. To 
> > best protect our users from spam, the message has been 550-5.7.1 blocked. 
> > Please visit 550 5.7.1  https://support.google.com/mail/answer/188131 for 
> > more information. bo27si207201edb.287 - gsmtp (in reply to end of DATA 
> 
> For a long time now it's becoming a real nuisance to self host email 
> servers. You need a static IP with clean / good reputation + nspf, 
> dkim, dmarc and all that

At last count: MTA-STS, MX, SPF, DMARC, TLS-RPT, DKIM, CSA, SRV, and
a few "prove to $thirdparty that I own this domain" records for various
third parties.  And even then, a new outbound IP requires a slow
warm-up etc..

It's definitely a lot easier to use a relayhost.

> while most your mail will be routed trough google anyway. It's
> probably only worth it for big setups or educational purposes.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Some Bash/zsh helpers to convert away from bitbucket's mercurial repos

2019-08-24 Thread Daniel Shahaf
Shlomi Fish wrote on Sat, 24 Aug 2019 10:32 +00:00:
> On Fri, Aug 23, 2019 at 12:30 PM Efraim Flashner  
> wrote:
> > Alternatively, for anyone wishing to remain using mercurial, sourcehut
> >  offers hosting of hg repositories. And has a "come on over from
> >  bitbucket" script.
> > 
> > https://hg.sr.ht/~sircmpwn/invertbucket
> > 
> 
> [...] git established itself as the golden standard for now

Yes, that's a good point: when deciding on a version control system,
choosing a more popular one means that (all else being equal) the
average new contributor would have a lower learning curve.

This point is applicable to any shared resource: for example, the
programming language of choice, build dependencies, etc.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Debconf20 will be in...

2019-03-20 Thread Daniel Shahaf
moshe nahmias wrote on Wed, 20 Mar 2019 13:37 +00:00:
> congratulations!
> 
> On Wed, Mar 20, 2019 at 3:27 PM Lior Kaplan  wrote:
> > Credit for the bid mostly belongs to Tzafrir who led this for the past 6 
> > months.
> > 

Kudos!

@Bid team — any help needed with organizing?

Cheers,

Daniel

> > On Wed, Mar 20, 2019 at 3:21 PM Daniel Shahaf  
> > wrote:
> >> tl;dr: the 2020 incarnation of Debconf (Debian's annual developers
> >>  conference) will be held in Haifa. This is the second-next Debconf,
> >>  following one scheduled for July 2019 in Brazil.


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Fwd: Debconf20 will be in...

2019-03-20 Thread Daniel Shahaf
tl;dr: the 2020 incarnation of Debconf (Debian's annual developers
conference) will be held in Haifa.  This is the second-next Debconf,
following one scheduled for July 2019 in Brazil.

Congratulations to the bid team :-)

Daniel


Daniel Lange wrote on Wed, 20 Mar 2019 13:02 +00:00:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Dear DebConf members,
> Dear friends of the conference,
> 
> We have had two strong final bids for hosting DebConf20:
> Haifa, Israel and Lisbon, Portugal.
> 
> Within the DebConf committee and the wider DebConf team there have
> been extensive discussions about Israel as a hosting country and we
> acknowledge that there will be some members of Debian that prefer to
> not travel to Israel for political reasons.
> 
> Still the Committee felt the upsides of the bid were significant and
> edged well over the Portuguese bid. But it was a close call. The five
> member DebConf committee had a two hour final decision meeting and a
> 3:2 vote in favor of Israel.
> 
> So, congratulations, to the Israeli bid team:
> Your mission, should you choose to accept it, is to host the Debian
> Developer Conference 2020 in Haifa!
> 
> To make life a bit easier for the many Debian members in Europe, and
> those restricted in travel, we would like to have DebConf21 in Europe
> again. The DebConf Committee therefore kindly asks the Portuguese team
> to carry over their bid to 2021. As the location and attendee volume
> are expected to be very challenging, we encourage long-term DebConf
> team members to join their team, for 2021, to ensure it succeeds. We
> hope the Brazilian team, once it has recovered from their DebConf, can
> and will offer support to their language-siblings in Portugal.
> 
> We look forward to seeing you all in Curitiba, 21 July – 28 July 2019,
> for DebConf19.
> Registrations are open at https://debconf19.debconf.org/register/ .
> 
> And, a year later, to seeing you in Haifa, Israel.
> 
> Best regards,
> Daniel
> for the DebConf committee

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Patch management tools?

2018-08-29 Thread Daniel Shahaf
Omer Zak wrote on Tue, 28 Aug 2018 23:49 +0300:
> While I can reapply my patches by using 'git rebase', I am curious to
> know if there any specialized tools which assist in this process. Like
> the 'quilt' tool used by Debian package maintainers to deal with a very
> similar use case.

There is https://github.com/git-series/git-series but it appears to be
unmaintained.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Server load spike debugging

2018-04-27 Thread Daniel Shahaf
David Suna wrote on Wed, 25 Apr 2018 22:12 +0300:
>  I am working on a VPS. Earlier today there was a load spike that made
>  the server unresponsive for a period of time (around 10-15 minutes).
>  Both ssh and web access were not responsive. After a while the problem
>  just stopped and the server started responding again.
> 
>  How can I go about diagnosing what caused the problem?

It might help to keep an ssh session open throughout the day with a root
shell (real '#' prompt, not just sudoable unprivileged shell) running in
it; such a shell might be usable even when the CPU contention is so high
that new ssh logins aren't possible.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Hebrew Translation of Computer Terminology

2018-01-15 Thread Daniel Shahaf
Amichai Rotman wrote on Mon, 15 Jan 2018 17:01 +0200:
> Is there an up-to date list of the Hebrew translation for computer related
> terms?
> 
> I am referring to a standard list of terms for computer components in
> Hebrew, i.e. CPU, RAM, Hard Drive etc.

It's not a "list" per se, but generally I use wikipedia's interlanguage
links, i.e., go to https://en.wikipedia.org/wiki/Hard_drive and then
click on "עברית" in the navigation bar.

Surprisingly I don't see the links in the wiki page's source (only in
the HTML source).

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Rendering of ו עם חולם

2018-01-13 Thread Daniel Shahaf
Daniel Shahaf wrote on Sat, 13 Jan 2018 17:52 +:
> I was trying to print a word with niqqud in LibreOffice Writer.

I'm on Debian stretch, libreoffice 1:5.2.7-1.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Rendering of ו עם חולם

2018-01-13 Thread Daniel Shahaf
tl;dr: Rendering of וֹ looks wrong in LibreOffice Writer in many fonts

I was trying to print a word with niqqud in LibreOffice Writer.  The word in
question has a חולם מלא.  In most fonts, that holam rendered above the ו and
slightly to its left, rather than directly above it, making it look more like a
ו with חולם חסר (a /vo/ sound) than like a ו being a mater lectionis (part
of a long /o/ sound of the preceding consonant).

This happened in every font I tried except for one.¹

Looking in unicode —

$ unicode HOLAM | me
U+05B9 HEBREW POINT HOLAM
UTF-8: d6 b9 UTF-16BE: 05b9 Decimal:  Octal: \02671
 ֹ
Category: Mn (Mark, Non-Spacing)
Unicode block: 0590..05FF; Hebrew
Bidi: NSM (Non-Spacing Mark)
Combining: 19 (?)

U+05BA HEBREW POINT HOLAM HASER FOR VAV
UTF-8: d6 ba UTF-16BE: 05ba Decimal:  Octal: \02672
 ֺ
Category: Mn (Mark, Non-Spacing)
Unicode block: 0590..05FF; Hebrew
Bidi: NSM (Non-Spacing Mark)
Combining: 19 (?)

U+FB4B HEBREW LETTER VAV WITH HOLAM
UTF-8: ef ad 8b UTF-16BE: fb4b Decimal:  Octal: \0175513
וֹ
Category: Lo (Letter, Other)
Unicode block: FB00..FB4F; Alphabetic Presentation Forms
Bidi: R (Right-to-Left)
Decomposition: 05D5 05B9
 
U+05D5 HEBREW LETTER VAV
UTF-8: d7 95 UTF-16BE: 05d5 Decimal:  Octal: \02725
ו
Category: Lo (Letter, Other)
Unicode block: 0590..05FF; Hebrew
Bidi: R (Right-to-Left)

— I'm guessing that a וֹ (U+05D5 + U+05B9) should render with the point directly
above the letter, whereas וֺ (U+05D5 + U+05BA) should render with the point to
the north-northwest of the letter.  Is that right?  (If it is, then fonts that
render U+05B9 to the northwest of the letter should receive bug reports.)

Cheers,

Daniel

¹ Noto Sans Hebrew rendered it correctly.  (I'm not affiliated with the makers
of that font.)

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Internet recommendations

2017-07-24 Thread Daniel Shahaf
Geoffrey Mendelson wrote on Sun, 23 Jul 2017 22:07 +:
> Tonight from around midnight until 0:50 both DSL lines and cellular data
> went out.
> 
> My son thinks something happened we will read about tomorrow on the news.
> 
> I think the timing indicates a shift change at BEZEQ and the night shift
> did some maintainence.

In my experience, short (< 5 min) outages during the night are not unusual
with bezeq.

I haven't set up a monitoring ping from my home LAN to the outside world
to gather hard data, but it'd be an interesting experiment.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Internet recommendations

2017-07-16 Thread Daniel Shahaf
Good morning Geoff,

Geoff Shang wrote on Sun, 16 Jul 2017 21:30 +0100:
> My requirements are, therefore, in no particular order:
> 
> * Fast
> * Reliable
> * Usable with third-party routers
> * Able to be managed without a visual CAPTCHA.
> 
> Obviously, some of this is relevant to ISPs as well as carriers, so any 
> thoughts on the best ISPs would also be welcome.  I'm more interested in 
> quality and capacity than the usual bells and whistles the big ISPs have 
> that no-one ueses anyway.

If I understand correctly, your constraint is the ISP-provided box must not
have a visual-only CAPTCHA.

Have you considered using, not only your own router, but also your own modem?
That is, buy on the free market a box that has one RJ11 port and one or more
RJ45 ports, and then simply ask the ISP for the username / password / protocol
details and configure them on the hardware of your choice.

This approach is not bulletproof — some ISP's have a bad habit of giving little
advance notice when the login details change — but it would divorce your choice
of ISP from details of the ISP-provided modem.

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: RavKav Online

2017-03-07 Thread Daniel Shahaf
Efraim Flashner wrote on Tue, Mar 07, 2017 at 14:56:17 +0200:
> grumble grumble .deb only.

It's a binary blob:

% find 
.
./usr
./usr/bin
./usr/bin/ravkavonline
./usr/share
./usr/share/doc
./usr/share/doc/ravkavonline
./usr/share/doc/ravkavonline/LICENSE.txt
./usr/share/doc/ravkavonline/changelog.gz
./usr/share/applications
./usr/share/applications/ravkavonline.desktop
% file usr/bin/ravkavonline
usr/bin/ravkavonline: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 
2.6.32, BuildID[sha1]=3b16f56a9473ef060b60c7ae071ec861bb78e9ad, stripped
% zcat ./usr/share/doc/ravkavonline/changelog.gz | wc -l
0
%

So yeah, it's a step in the right direction, but they have a lot of room
for improvement.

Somebody should reach out and ask them to improve things for 1.2.0.

Cheers,

Daniel


> Still happy that we're at least represented.
> 
> 
> On Tue, Mar 07, 2017 at 10:21:42AM +0200, Yehuda Deutsch wrote:
> > Thanks,
> > 
> > They finally identify the OS correctly in the website.
> > 
> > Yehuda
> > 
> > --
> > *Yehuda Deutsch | IT Developer*
> > 
> > On Tue, Mar 7, 2017 at 12:08 AM, Dimid Duchovny  wrote:
> > 
> > > Just noticed this:
> > > https://ravkavonline.co.il/releases/linux/
> > >
> > > 2016-02-15 22:38 GMT+02:00 Amichai Rotman :
> > >
> > >> Great Job, Yaron!
> > >>
> > >> Thanks!
> > >>
> > >> 2016-02-15 10:06 GMT+02:00 Yaron de Leeuw :
> > >>
> > >>> Hi.
> > >>>
> > >>> I have managed to get it working on ArchLinux, and adapting the solution
> > >>> to
> > >>> other distributions should be trivial.
> > >>> https://github.com/jarondl/ravkav_linux
> > >>>
> > >>> I have also emailed their support to ask for official linux packages,
> > >>> and I encourage
> > >>> you all to do so as well.
> > >>>
> > >>> Thank you Dimid Duchovny for finding the Mac OS installation package and
> > >>> posting their url on the list.
> > >>>
> > >>> Yaron
> > >>>
> > >>
> > >
> > > ___
> > > Linux-il mailing list
> > > Linux-il@cs.huji.ac.il
> > > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> > >
> > >
> 
> > ___
> > Linux-il mailing list
> > Linux-il@cs.huji.ac.il
> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> 
> 
> -- 
> Efraim Flashner      אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted



> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: strange ping and traceroute results

2016-11-19 Thread Daniel Shahaf
Shlomo Solomon wrote on Sun, Nov 20, 2016 at 07:01:10 +0200:
> When I try ping or traceroute to www.google.com, I get strange results.
> Both utilities "think" that www.google.com is at 213.57.*.*, but those
> addresses belong to my Internet provider - Hotnet.
> 
> What am I missing?
> 

Try with a trailing dot?

% ping www.google.com.


Try other domains?

% ping www.$(pwgen).com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [ANN] Understanding Vim's excalamation mark command quoting/escaping rules

2016-04-01 Thread Daniel Shahaf
Shlomi Fish wrote on Fri, Apr 01, 2016 at 15:38:42 +0300:
> Hi Daniel,
> 
> thanks for your reply,
> 

You're welcome.

> On Fri, Apr 1, 2016 at 9:03 AM, Daniel Shahaf 
> <d.s-dgtty7x8zficcafzklukruemvnt87...@public.gmane.org>
> wrote:
> 
> > Shlomi Fish wrote on Thu, Mar 31, 2016 at 22:56:28 +0300:
> > > I prepared a document where I investigated which characters need to be
> > > escaped in vim's ":!" commands of filtering the text through a shell
> > > command.
> >
> > The escape rules are documented:
> >
> > :help cmdline-special
> >
> >
> I see - thanks. I was unable to find them in:
> 
> 1. vim's help.
> 

I found it by doing:

:help c_%

to find the place where the s/%/current buffer's name/ transformation is
documented, and then scrolling up to the enclosing section's header.

That relied on knowing the tagname convention documented in :h help-context.

> 2. DuckDuckGo search.
> 
> 3. Google search.
> 
> 4. asking on freenode's #vim chatroom.
> 
> and the text there seems somewhat confusing.
> 

You might want to take the unclarity of the help text with vim upstream,
then.  (I.e., to file a docs bug)

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [ANN] Understanding Vim's excalamation mark command quoting/escaping rules

2016-04-01 Thread Daniel Shahaf
Shlomi Fish wrote on Thu, Mar 31, 2016 at 22:56:28 +0300:
> I prepared a document where I investigated which characters need to be
> escaped in vim's ":!" commands of filtering the text through a shell
> command.

The escape rules are documented:

:help cmdline-special

> Executive summary:
> 
> - “%”, “#”, and “!” should be escaped with a backslash (“\”).
> 
> - All other punctuation/special characters (including a backslash)
> need not and should not be escaped.

Beyond [%#!] which you mention, there are also:

- «» and friends

- The envvars $MYVIMRC, $VIM, $VIMRUNTIME are available (:help $VIM,
  :help $MYVIMRC)

- A literal LF (ASCII 0x0A) can't be entered (:help NL-used-for-NUL)

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How to search Linux Kernel changelogs? (USB disconnect problem)

2015-12-23 Thread Daniel Shahaf
Omer Zak wrote on Mon, Dec 21, 2015 at 13:54:50 +0200:
> At your hint, I have installed powertop.
> I did not find a tip in Debian, but there is a tiptop command in my
> system.

Rabin wrote "tlp" with an 'L', not "tip" with an 'I'.

Daniel

> How can they help me diagnose USB problems?
> 
> 
> On Mon, 2015-12-21 at 13:35 +0200, Rabin Yasharzadehe wrote:
> > do you install/use powertop or tlp ?

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [OT] driver's license exam app?

2015-08-23 Thread Daniel Shahaf
Omer Zak wrote on Fri, Aug 21, 2015 at 07:51:51 +0300:
 Hello Daniel,
 Three years ago, I developed an Android application which does the same
 thing [1].
 
 I hoped to get more volunteers to polish and improve it, however there
 was very little interest in it.

Haven't seen it, but in my case I needed a desktop app, not a smartphone one.

 Nevertheless, it was a good way to tell the world that yes, I am an
 Android developer.  I got other projects thanks to it (such as [2]).
 
 So I suggest that you release your application but without expecting
 anything from it beyond being a showcase of your software development
 skills.

That's good advice.

However, I don't think the code showcases anything: it's a chunk of glue
code that any first-year student could write.  It saves time but is not
enlightening to read.  The only value I see in it is that it might save
someone else the need to redo the work I have done.

 While you are it, I strongly urge you to split off the part of the code,
 which deals with Hebrew terminals, and make it a library that people can
 take and use in their own projects. Maybe you'll be able to contribute
 to terminfo/ncurses projects.

All I have is a chunk of code that decides whether or not to insert
fribidi into the output filter chain based on whether 
$(ps -o comm= -p $(xprop -id $WINDOWID _NET_WM_PID | sed 's/.*= *//g'))
contains mlterm or konsole.

While that chunk of code does solve a problem that is in scope for
ncurses, I believe the approach it takes is unsuitable for inclusion
therein, for several reasons: (a) it would require ncurses to link
libx11 (to get window properties); (b) it hardcodes terminal names that
behave differently — that is a duct-tape solution, not a long-term one;
(c) it is sometimes wrong: konsole can be configured to behave either
way, but the code hardcodes a specific behaviour for it.

In short, what I have is a duct-tape solution, not a long-term one.
That was fine for the context I wrote it in (I needed to get my app to
work in today's terminal emulators without changing them), but it's not
suitable for upstreaming.  The proper long-term fix would be either to
make terminal emulators all behave the same way with respect to
directionality, or to invent a terminfo capability that terminals would
set in their terminfo descriptors and ncurses could query.

Cheers,

Daniel

 --- Omer
 
 
 
 [1] https://github.com/Hamakor/teuria
 [2]
 https://play.google.com/store/apps/details?id=com.heliconbooks.epub.epubreader
 
 
 On Fri, 2015-08-21 at 01:24 +, Daniel Shahaf wrote:
  I've got here a desktop app that quizzes the user with questions from
  מבחן התיאוריה (the one people take when they learn driving).  It's
  basically a self-test/study app, using the questionset from the
  Ministry's web site.  (They publish questionsets in six languages,
  I only tried the Hebrew set.)
  
  By app I mean a python script that prints questions to stdout, reads
  answers from stdin, and displays images by invoking display(1) [a
  minimal image viewer from imagemagick].  It doesn't have a GUI (beyond
  the image displayer) since my target audience didn't need one.
  
  I can't release it as-is because $LEGAL_REASONS, but I could clean it up
  to make it releaseable.  Before I spend too much time on that, is that
  something anybody would be interested in?
  
  [feel free to reply offlist]
  
  Cheers,
  
  Daniel
  
  P.S. It wasn't fun to get Hebrew to print correctly on all terminals:
  there are differently-behaving terminals that use the same value of
  $TERM (undermining terminfo-based solutions).  I ended up using
  $WINDOWID to get the terminal emulator's argv[0], and hardcoding
  exceptions based on that.  That's so 1990...
 -- 
 QA People of Curse.
 My own blog is at http://www.zak.co.il/tddpirate/
 
 My opinions, as expressed in this E-mail message, are mine alone.
 They do not represent the official policy of any organization with which
 I may be affiliated in any way.
 WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html
 
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


[OT] driver's license exam app?

2015-08-20 Thread Daniel Shahaf
I've got here a desktop app that quizzes the user with questions from
מבחן התיאוריה (the one people take when they learn driving).  It's
basically a self-test/study app, using the questionset from the
Ministry's web site.  (They publish questionsets in six languages,
I only tried the Hebrew set.)

By app I mean a python script that prints questions to stdout, reads
answers from stdin, and displays images by invoking display(1) [a
minimal image viewer from imagemagick].  It doesn't have a GUI (beyond
the image displayer) since my target audience didn't need one.

I can't release it as-is because $LEGAL_REASONS, but I could clean it up
to make it releaseable.  Before I spend too much time on that, is that
something anybody would be interested in?

[feel free to reply offlist]

Cheers,

Daniel

P.S. It wasn't fun to get Hebrew to print correctly on all terminals:
there are differently-behaving terminals that use the same value of
$TERM (undermining terminfo-based solutions).  I ended up using
$WINDOWID to get the terminal emulator's argv[0], and hardcoding
exceptions based on that.  That's so 1990...

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: xargs guide

2015-07-30 Thread Daniel Shahaf
Steve Litt wrote on Wed, Jul 29, 2015 at 21:37:47 -0400:
 Hi all,
 
 xargs is a gender-changer type program that adapts one program's stdout
 to the next program's command line arguments. It's extremely handy for
 shell scripting, but it can be tricky. I've written a short guide for
 xargs that shows how to get around the usual xargs landmines:
 
 http://www.troubleshooters.com/linux/xargs.htm
 
 Hope you like it.

I looked for a warning that xargs parses quotes by default and didn't
find it.  For example, if the input is «foo bar» (9 bytes), then xargs
will treat that as the single argument «foo bar», not as two arguments
«foo» and «bar».

There's no discussion of which switches are specific to GNU xargs and
which are available on other systems.  For example, FreeBSD has -P but
not --max-procs, while POSIX has neither.

In the second example, plain ls | cat would have the same output, so
it's not clear what effect the RHS of the pipe has.  You should probably
mention explicitly that xargs' input in the 'ls | xargs --max-lines=1'
case is not what 'ls' prints when its output is a tty (or pick
a different command for the LHS of the pipe).

None of the examples pass -- to the xargs subcommand (as in xargs ls
-d --) to protect against filenames with initial minuses.

The filter example uses \. and $ within a double-quoted string.  The \.
is not forward-compatible (a future version of either sh(1) or regex(3)
might define it as an escape sequence).  The $ inside  might mislead
readers who don't know shell quoting rules to think $ is not
a metacharacter inside .  I'd change to single quotes, which would
address both issues.

So overall, I'd say this is a nice introduction but it glosses over some
subtleties.

HTH

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [Off Topic]: Speedy Mail 2.0 - a new webmail platform in Python and Django

2015-07-23 Thread Daniel Shahaf
Uri Even-Chen wrote on Thu, Jul 23, 2015 at 16:24:57 +0300:
 Which protocols we should use to connect to the mail server? I understand
 that IMAP has folders but not labels/tags, does it mean we can't use it? Is
 it better to use POP3?

IMAP does have labels, via the FLAGS command.  (There are system flags
like \Seen and keyword flags which are probably what you want.)  The
question of client support is another matter, but if you're writing
a webmail, you can write it to exploit the feature as much as you want
(and as the underlying imapd permits). 

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Memory pool interface design

2015-05-17 Thread Daniel Shahaf
Elazar Leibovich wrote on Sun, May 17, 2015 at 00:04:49 +0300:
 A concrete example, a regular read_line function
 
 char *read_line(struct reader *r) { char *rv = malloc(len); read_to(rv);
 return rv; }
...
 Our read_line example would now look like
 
 struct error read_line(struct reader *r, char **line);
 
 And users would have to check error at each invocation.
 
 I think I can avoid that. What do I intend to do?

Another option is to signal error out-of-band — via some thread-global
variable or function — and require API users to check that out-of-band
channel after each call:

line = read_line()
if (line == NULL || read_line_error())
/* ... */ ;

For example:
https://docs.python.org/3/c-api/exceptions.html#c.PyErr_Occurred

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Hebrew subject text in mutt

2015-01-05 Thread Daniel Shahaf
Alan Yaniger wrote on Mon, Jan 05, 2015 at 14:09:06 +0200:
 Hi Linux-IL members,
 
 I'm using bidiv to read Hebrew in mutt.
 
 It works ok with reading Hebrew messages, but not when reading the
 subject headers, which still show the Hebrew backwards.
 

Personally, I set edit_headers=on, and when I want to reverse an RTL
subject or body I type 'g' to open it in $EDITOR, read it there, and
then discard the editor.  That's not a great solution but it works well
when the volume of RTL mail is low.

(more below)

 So I wrote the following script caled bidi_index to enable reading of 
 Hebrew in the subjects:
 
 echo $@  /tmp/index.out  bidiv /tmp/index.out
 
 and I added to .muttrc the following:
 
 set index_format = /home/alan/.mutt/bidi_index %D %-15.15L   %s (%Z) |
 
 (I tried piping the text directly to bidiv, but I got an error, so I write to 
 a temp file, and I have my script read the temp file.)
 
 Mutt shows the Hebrew properly, but it creates a new problem. The minimum 
 length for the sender's name no longer works. My setting is for a minimum 
 length of 15 chars, as in the index_format setting I quoted above, but if the 
 name is less than 15 chars, mutt does not pad the rest of the 15 chars with 
 blanks.
 
 This problem doesn't exist if I don't pipe to my script.
 
 Does anyone know how to fix with this problem, or does anyone have an 
 alternative way of displaying Hebrew in mutt (which you've checked gets 
 around this problem)?  
 

Did you try changing
echo $@
to
echo $@?

The difference:

% sh -c 'echo $@' - 'foo ' bar   
foo bar
% sh -c 'echo $@' - 'foo ' bar 
foo  bar

That's still not robust — it breaks when $1 is -e or -n.  If that's a
concern, use printf(1) instead of echo.

Cheers,

Daniel

 I'm using Mutt 1.5.21 (2010-09-15) on a gnome-terminal in Ubuntu 12.04,
 with LC_ALL=en_US.utf8.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: How do I debug this (mailman)?

2014-10-11 Thread Daniel Shahaf
Shachar Shemesh wrote on Fri, Oct 10, 2014 at 15:38:29 +0300:
 I'm trying to set up mailman on a new host (transferring my VPS to a new
 machine). This is running Debian. Mailman is set up, shows up in the web
 interface. I transferred the mailing list. I'm trying to send myself a
 password reminder, and nothing.
 
 The postfix logs don't show anything at all.
 /var/lib/mailman/qfils/virgin shows something that looks like the
 password reminder
 Nothing appears in my inbox.
 
 All tips on the internet say to look for the mailer's logs to find out
 what's wrong, but the mailer doesn't show any logs at all.
 
 Ideas?
 
 Shachar

Could that be caused by MX records for the list not yet pointing at the
new host?

i.e., perhaps the new mailman instance is not handling the list yet
because MX records don't point at it (the new mailman instance).

HTH

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: LaTeX on Ubuntu

2014-04-08 Thread Daniel Shahaf
Oleg Goldshmidt wrote on Tue, Apr 08, 2014 at 17:55:59 +0300:
 I got desperate and ran
 
 $ export TEXINPUTS=$(ls -R /usr/share/tex* | awk '/^\/.+:$/ {printf
 %s,$0}').
 
 After this, everything worked.
 
 Has anyone here encountered this problem? Solved it? Any ideas?

- strace to see where article.cls is being looked for at?

- Maybe your user has some TEX* envvars or texmf trees that get in the
  way.  In particular, TEXINPUTS might have been set before you ran the
  'export' command.  Perhaps try building as a new user account (with no
  envvars or trees other than those the build script itself sets)?

Good luck.

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [Haifux] [HAIFUX LECTURE] Command-line utilities: Tips and tricks (part II) -- Eli Billauer

2013-08-19 Thread Daniel Shahaf
Michael Shiloh wrote on Sun, Aug 18, 2013 at 16:36:35 -0700:


 On 08/18/2013 02:08 PM, Daniel Shahaf wrote:
 Some of the odd corners of shell syntax are quite useful in interactive
 usage.  For example:

 % (){ foo $1 bar } 24
 to run a command several times (recalling it from history) and change
 some parameter around the middle of the command line without having to
 scroll to it every time.


 wait, can you explain  this?

Sure.  It's a zsh-specific syntax for an anonymous function with
arguments.  In effect it's an anonymous block.  For example:

% (){ printf $1\n 04 } %s  
04
% (){ printf $1\n 04 } %d  
4
% (){ printf $1\n 04 } %e  
4.00e+00

In interactive usage I sometimes find myself wanting to run a command
several times in a row with one argument changed.  When that argument is
in the middle of a (potentially multi-line) command, I find it easier to
change it between runs by using an ad-hoc anonymous function to move the
argument-to-be-changed to the end of the input.  Another case where that
would be useful is when the argument appears in two places in the
command --- using an anonymous function allows changing the argument in
just one place rather than two.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [Haifux] [HAIFUX LECTURE] Command-line utilities: Tips and tricks (part II) -- Eli Billauer

2013-08-19 Thread Daniel Shahaf
Oleg Goldshmidt wrote on Mon, Aug 19, 2013 at 17:00:40 +0300:
 Daniel Shahaf d...@daniel.shahaf.name writes:
 
  Sure.  It's a zsh-specific syntax for an anonymous function with
  arguments.  In effect it's an anonymous block.  For example:
 
  % (){ printf $1\n 04 } %s  
  04
  % (){ printf $1\n 04 } %d  
  4
  % (){ printf $1\n 04 } %e  
  4.00e+00
 
  In interactive usage I sometimes find myself wanting to run a command
  several times in a row with one argument changed.  When that argument is
  in the middle of a (potentially multi-line) command, I find it easier to
  change it between runs by using an ad-hoc anonymous function to move the
  argument-to-be-changed to the end of the input.  Another case where that
  would be useful is when the argument appears in two places in the
  command --- using an anonymous function allows changing the argument in
  just one place rather than two.
 
 In bash, I use fc (fix command) for this:
 
 $ printf %s\n 04
 04
 $ fc -s %s=%d
 printf %d\n 04
 4

That looks equivalent to ^foo^bar, which both shells support:

# printf %s\n 04
04
# ^%s^%d
4

 $ fc -n -3 -1
 
 or similar to edit the last 3 commnds (with $EDITOR, or use -e) 
 and execute them when done editing.

Nice, thanks.  The same invocation works in zsh too.  I also know of an
extension to edit the *current* command line in $EDITOR:

(zsh)
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^Fc' edit-command-line

(vim)
CTRL-F (controlled by :help 'cedit')

 

We should probably be collecting such tips on a wiki page or something;
on list archives they'll just be lost...

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [Haifux] [HAIFUX LECTURE] Command-line utilities: Tips and tricks (part II) -- Eli Billauer

2013-08-18 Thread Daniel Shahaf
Amos Shapira wrote on Sun, Aug 18, 2013 at 08:46:02 +1000:
 And the list goes on and on.

Some of the odd corners of shell syntax are quite useful in interactive
usage.  For example:

% (){ foo $1 bar } 24
to run a command several times (recalling it from history) and change
some parameter around the middle of the command line without having to
scroll to it every time.

% grep $smtp_id *(om[1,5])
to grep the 5 most recent log files.

I suppose bash has its own syntax for that but I don't know what it is.

Daniel
(naturally, I don't use these in scripts #!ed to plain sh)

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Jolla phone

2013-05-28 Thread Daniel Shahaf
E.S. Rosenberg wrote on Tue, May 28, 2013 at 17:18:40 +0300:
 2013/5/28 Daniel Shahaf d...@daniel.shahaf.name:
  E.S. Rosenberg wrote on Tue, May 28, 2013 at 12:52:56 +0300:
  Normally I don't do this, but I was wondering, any other people here
  pre-ordering?
 
  I've got them earmarked on my May be a good option; review them after
  they have released some product shelf.
 Since there's a free pre-order option I figured might as well, it's
 like a vote get this device to my country.
 
 Also I am a n900 user and the only reason I seek to replace my trusty
 n900 is that I abused it to much (too many falls etc.), the OS even in
 the n900 days was great, the n9 OS was really good according to all
 reviews and this is it's evolution so to me it sounds very good.

Point taken.  I'll have to read the reviews if I find a few minutes to
spare...  (but I don't have an urgent need for a new phone) 

Cheers

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Jolla phone

2013-05-28 Thread Daniel Shahaf
E.S. Rosenberg wrote on Tue, May 28, 2013 at 12:52:56 +0300:
 Normally I don't do this, but I was wondering, any other people here
 pre-ordering?

I've got them earmarked on my May be a good option; review them after
they have released some product shelf.

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: OT: mailbox generator

2013-04-25 Thread Daniel Shahaf
Tangentially related, I couldn't give my password if I wanted to: I'm
a touch-typist, so I have my password wired in muscle memory, but
I never memorized the string value, so I wouldn't be able to give that
verbally or write it on paper --- I can only recover it by using
a qwerty keyboard.

I'm not sure a borders police agent would appreciate this point.


Tzafrir Cohen wrote on Thu, Apr 25, 2013 at 15:23:17 +0200:
 Off topic, but may be interesting:
 
 I heard recently that it is now legal for the security checks in the Ben
 Gurion airport to require that I show my mail account.
 
 Any existing software to automatically (and periodically) generate email
 on a mailbox which will appear to be used, so if anybody wants a casual
 look at my mailbox, I don't have to provide any real email credentials?
 
 -- 
 Tzafrir Cohen | tzaf...@jabber.org | VIM is
 http://tzafrir.org.il || a Mutt's
 tzaf...@cohens.org.il ||  best
 tzaf...@debian.org|| friend
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: OT: mailbox generator

2013-04-25 Thread Daniel Shahaf
Daniel Shahaf wrote on Thu, Apr 25, 2013 at 22:36:31 +0300:
 Tangentially related, I couldn't give my password if I wanted to: I'm
 a touch-typist, so I have my password wired in muscle memory, but
 I never memorized the string value, so I wouldn't be able to give that
 verbally or write it on paper --- I can only recover it by using
 a qwerty keyboard.
 
 I'm not sure a borders police agent would appreciate this point.
 

Thinking a little further... if I give them credentials without access
to a qwerty, I'll probably be giving a password that's similar to but
not equal to the real one.  (Not intentionally; just a corollary the
fact that I don't know my password's string value.)

If the agents on-scene try to use that value, the most likely outcome is
that it won't work.  They could try a dictionary attack (basically,
iterate potential passwords in order of their edit distance from the
value I gave), which will either get them in or trigger a server-side
account lock.

Or they could give me a qwerty.

Daniel

 
 Tzafrir Cohen wrote on Thu, Apr 25, 2013 at 15:23:17 +0200:
  Off topic, but may be interesting:
  
  I heard recently that it is now legal for the security checks in the Ben
  Gurion airport to require that I show my mail account.
  
  Any existing software to automatically (and periodically) generate email
  on a mailbox which will appear to be used, so if anybody wants a casual
  look at my mailbox, I don't have to provide any real email credentials?
  
  -- 
  Tzafrir Cohen | tzaf...@jabber.org | VIM is
  http://tzafrir.org.il || a Mutt's
  tzaf...@cohens.org.il ||  best
  tzaf...@debian.org|| friend
  
  ___
  Linux-il mailing list
  Linux-il@cs.huji.ac.il
  http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Hardware Database

2012-12-27 Thread Daniel Shahaf
Amichai Rotman wrote on Thu, Dec 27, 2012 at 15:05:58 +0200:
 Hello,
 
 It would've been nice to start a website where people could refer to to
 find out all the practical issues of installing / using FLOSS in Israel:
 
 * A hardware DB where they can look up a device by category (i.e.
 Motherboard) and check the compatibility sorted by distro etc.
 
 * A list of Israeli Linux friendly vendors (including vendors outside
 Israel that are willing to ship their products to Israel hustle free).
 
 * Distro specific Installation Guides, pointing out any common pitfalls.
 
 Such sites might exist out there in the Net, but none of them are Israeli
  specific or in Hebrew and don't hold all the a fore mentioned features in
 one place...
 Another plus is the fact that the content will be socially contributed - by
 the users themselves.
 
 What do you think?
 

I don't need installation guides, but a hardware/vendor DB I would find
useful.

   Amichai Rotman
  Penguin - FLOSS Computer Service and Technical Consulting
  +972-73-7962360 ||  +972-54-4605787


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: OT: creating disk image from existing disk for VirtualBox

2012-12-06 Thread Daniel Shahaf
Nadav Har'El wrote on Thu, Dec 06, 2012 at 22:47:17 +0200:
 On Thu, Dec 06, 2012, Mord Behar wrote about Re: OT: creating disk image 
 from existing disk for VirtualBox:
  On Thu, Dec 6, 2012 at 9:26 PM, David Suna 
  da...@davidsconsultants.comwrote:
   I have an old hard disk which ran Windows XP.  I would like to turn that
   into something that I can run as a virtualbox client.  Does anyone know 
   how
   I would go about doing that?
  
  I've never actually tried this, but the following line might work:
  dd if=/ of=/path/to/newImageFile.vdi
 
 I assume you mean
   dd if=/dev/sdc of=...
 
 with /dev/sdc the appropriate block device, not the mounted file system.

It's a good idea to have the filesystem unmounted while dd is running, too.
(Yes, some people on this thread already know this -- but mentioning it
for the archives.)

 If you don't specify bs=, might as well use cp instead of dd, by the
 way.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Requesting Input about a New Page about Text Processing Tools

2012-09-30 Thread Daniel Shahaf
Vim can be used non-interactively:

% vim -e -s -n -N -i NONE -u NONE -c 'g/bar/normal! g??' -c wq ./foo.txt

I'm not sure you listed ed:

% printf 'g/bar/d\nw\nq\n' | ed foo.txt

Shlomi Fish wrote on Tue, Sep 25, 2012 at 00:32:09 +0200:
 Hi all,
 
 I've set up a new page about text processing tools:
 
 http://www.shlomifish.org/open-source/resources/text-processing-tools/
 
 Currently I need to add some links to core UNIX text-processing commands
 (e.g: grep, sed, paste, cut, cat, etc.), as well as some general purpose
 languages with good support for text parsing and processing (e.g: Perl,
 Python, Ruby, Lua, etc.), but I intend to do so soon.
 
 But I want to ask you - is there anything you think I should add there?
 
 Please comment on the list.
 
 Regards,
 
   Shlomi Fish
  
 -- 
 -
 Shlomi Fish   http://www.shlomifish.org/
 Humanity - Parody of Modern Life - http://shlom.in/humanity
 
 COBOL is the old Java.
 
 Please reply to list if it's a mailing list post - http://shlom.in/reply .
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: qmail and mx records

2012-08-29 Thread Daniel Shahaf
It's not clear to me what your problem is/was, but we flush qmail's DNS
cache daily because we found it wasn't respecting TTL.

ik wrote on Wed, Aug 29, 2012 at 17:57:36 +0300:
 Answering myself: There is a DNS problem at my server side, and not
 the so called problematic server.
 
 Ido
 
 On Wed, Aug 29, 2012 at 3:12 PM, ik ido...@gmail.com wrote:
  Hello,
 
  I have a qmail (smtp) server . When there is a domain that only the MX
  records provides the other side smtp servers, qmail does not check it,
  and reports that it can not find any smtp servers.
  Using simple telnet on such servers, they do answer properly.
 
  I can't figure out how or what should be configured to make it check mx 
  records.
  I can only find how to set my own MX records for qmail, but not how to
  make qmail look for the server it is sending.
 
  Please note that I can not install postfix or exim, as normal smtp
  servers, so I have to solve this issue with qmail
 
  Thanks,
  Ido
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: What's the practical use of the error close() returns?

2012-07-29 Thread Daniel Shahaf
Shachar Shemesh wrote on Sun, Jul 29, 2012 at 06:35:18 +0300:
 On 07/29/2012 02:12 AM, Daniel Shahaf wrote:
  So if the disk hardware fails after close() returns but before the OS
  caches are flushed... 
 
 It is not part of close(2)'s job description to protect against this
 scenario. If you want to protect against this scenario, use sync(2).

No argument here.  Just wanted to explicitly point out that, when you
wrote cannot fail due to X, it still could fail due to Y.

Cheers,

Daniel

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: What's the practical use of the error close() returns?

2012-07-28 Thread Daniel Shahaf
Shachar Shemesh wrote on Sat, Jul 28, 2012 at 09:56:40 +0300:
 On 07/27/2012 02:52 PM, Elazar Leibovich wrote:
 
  (as mentioned earlier, the no space left could just as well happen
  after the file was closed, so I don't mind that much it's not reported
  on a close())
 
 Ehm, no.
 
 First of all, please note a subtle but important difference between your
 question and Orna's answer. You asked about close, she answered about
 fclose.
 
 Fclose is an stdio function, and performs a flush of the (user space)
 buffers. As such, it is possible for it to run out of disk space. Close,
 on the other hand, might only run out of disk space on remote file
 systems (such as nfs), and even then, it depends on the local cache
 coherency policy. I fail to see how an out of disk space might
 possibly happen AFTER close, as all that's left then are caches.
 
 Please note that just because the data is in the OS caches, rather than
 on disk, this does not mean that anything can change as far as file
 system notion of the data goes. By the time close returns, the OS has
 already allocated space for the data, and decided where on the disk this
 data should go. It is not possible for it to fail after that point
 because of lack of disk space.

So if the disk hardware fails after close() returns but before the OS
caches are flushed...

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Python question - first call is slower?

2012-06-20 Thread Daniel Shahaf
Nadav Har'El wrote on Wed, Jun 20, 2012 at 09:20:04 +0300:
 On Wed, Jun 20, 2012, Meir Kriheli wrote about Re: Python question - first 
 call is slower?:
  Is it a generator ?
 
 What does this mean? Sorry, but my level of knowledge of Python is well
 below my level in other programming languages... I guess I felt that I
 already know one language too many :(
 

Does it invoke the 'yield' statement?

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Semantic C code indexing and query tool

2012-05-14 Thread Daniel Shahaf
Baruch Siach wrote on Mon, May 14, 2012 at 07:34:56 +0300:
 Hi linux-il,
 
 I'm looking for a tool that can do semantic search is a body of C code.  
 Example query: give me all references to field y in struct x defined in file 
 z.h. I would prefer an open source, command line driven tool. C++ support is 
 an advantage. Does such a tool exist?
 

exuberant ctags.  Support for C/C++ struct members is enabled by default
(see `--list-kinds` output).

ctags \
--extra=+fq --fields=+S \
--c-kinds=+p --c++-kinds=+p --langmap=c:+.h \
--regex-c='/ERRDEF\((.*),/\1/e/' \
--langmap=sql:.sql.sql3 \
-R $@


 baruch
 
 -- 
  http://baruch.siach.name/blog/  ~. .~   Tk Open Systems
 =}ooO--U--Ooo{=
- bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Semantic C code indexing and query tool

2012-05-14 Thread Daniel Shahaf
Daniel Shahaf wrote on Mon, May 14, 2012 at 10:35:36 +0300:
 Baruch Siach wrote on Mon, May 14, 2012 at 07:34:56 +0300:
  Hi linux-il,
  
  I'm looking for a tool that can do semantic search is a body of C code.  
  Example query: give me all references to field y in struct x defined in 
  file 
  z.h. I would prefer an open source, command line driven tool. C++ support 
  is 
  an advantage. Does such a tool exist?
  
 
 exuberant ctags.  Support for C/C++ struct members is enabled by default
 (see `--list-kinds` output).

Well, not exactly.  I'm not sure ctags can find all the _references_ to
a given struct member -- but I'd not be surprised if cscope (already
mentioned) can do that.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Unicode in C

2012-03-13 Thread Daniel Shahaf
Nadav Har'El wrote on Tue, Mar 13, 2012 at 22:16:23 +0200:
 On Tue, Mar 13, 2012, Elazar Leibovich wrote about Re: Unicode in C:
  Something very important, one need to consider is Unicode normalization.
  That is, how to strip out the Niqud, and to substitute, say KAF WITH DAGESH
  (U+FB3B) with just a KAF (U+05DB) etc.
 
 Is this really important? Does anybody actually use Kaf with Dagesh ?
 Why does it even exist? :(
 

FWIW, Unicode normalization isn't just about ignoring niqud, it's also
about having =2 equivalent forms for the same object--- such as
é (U+00e9) and ́e (U+0301,U+0065).

I'm not sure whether this particular issue applies to Hebrew.

Daniel
(maybe you knew this already)

 I noticed there are even more bizarre characters, like HEBREW LETTER
 ALEF WITH MAPIQ (!?), HEBREW LIGATURE ALEF LAMED, HEBREW LETTER WIDE
 ALEF, HEBREW LETTER ALEF WITH QAMATS (Is Yiddish called Hebrew now??)
 HEBREW LETTER ALTERNATIVE AYIN, and other junk. Why do these exit?
 This is sad.
 
 Nadav.
 
 
 -- 
 Nadav Har'El|   Tuesday, Mar 13 2012, 
 n...@math.technion.ac.il 
 |-
 Phone +972-523-790466, ICQ 13349191 |War doesn't determine who's right but
 http://nadav.harel.org.il   |who's left.
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Migrating a Linux (Debian Squeeze) system from one HD to another HD

2012-02-18 Thread Daniel Shahaf
Omer Zak wrote on Sun, Feb 19, 2012 at 04:03:05 +0200:
 My PC has a 500GB hard disk, and I want to migrate it to a 2TB hard
 disk.
 The new hard disk has been formatted to have two physical partitions,
 one serves as /boot and the other is an encrypted LVM volume, which has
 its own division into logical partitions.
 
 I rsync'ed the old hard disk's contents into the new one (excluding
...
 2. Is there any guide about migrating a Debian Squeeze system inside an
 encrypted LVM partition from one hard disk to another hard disk?

One thing that jumps to mind: given that the old disk uses LVM too, you
could transition the LV's from the old disk to the new one by using LVM
tools.

I don't recall the exact commands, but I suppose it's along the lines of
convert the LV to a mirror (with one PV on the small disk and one PV on
the new one), then tell LVM to retire the old disk's PV's.

HTH.  I'm not sure how this interacts with the boot parts of the
equation or with encrypted partitions.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: vim mappings for Hebrew

2012-02-15 Thread Daniel Shahaf
Nadav Har'El wrote on Wed, Feb 15, 2012 at 09:57:18 +0200:
 On Wed, Feb 15, 2012, Avraham Rosenberg wrote about Re: vim mappings for 
 Hebrew:
  the difference between them...In general, I would like to know where from
  you got this wealth of information about the editor. Can you recommend some
  book?
 
 Vim has a very extensive user guide.

Indeed.

As extensive as the built-in docs are, though, they are not a source for
popular external plugins or configuration snippets.  I used to look for
such on the wiki (at wikia) and mailing list archives; presumably there
are third-party resources too these days.

 In the old days, when I actually
 used to compile the free software which I was using (and vim in
 particular exists since 1991, before Linux distributions existed), I
 would print out each program's user guide, and use free time like bus
 rides to read these manuals, cover to cover.
 
 Nowdays, with Linux distributions, it's so easy to just run vim and
 not even be aware that it has a user guide. But it still does. You can
 also get reference information from inside vim: if you run vim and type
 :help hebrew, you'll get an explanation on the hebrew features which

Another useful tip:

:help hebrewC-D
(triggers completion)

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: vim mappings for Hebrew

2012-02-14 Thread Daniel Shahaf
Avraham Rosenberg wrote on Tue, Feb 14, 2012 at 12:59:38 +0200:
 Hi all,
I need, lately, to edit Hebrew texts with vim. As most vim commands, in
 normal and command modes use lower-case latin letter, which cannot be
 produced when the terminal is in Hebrew chars mode, I found myself
 switching all the time..
 I started therefore to build a list of mappings, that would allow using
 these commands, without switching.
I guess that I am not the first one, on this list who stumbled against
 this problem. I would like to hear from others' experience.
 Here is the list of mappings that I use for now:

:set keymap=hebrew

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: vim mappings for Hebrew

2012-02-14 Thread Daniel Shahaf
Tzafrir Cohen wrote on Tue, Feb 14, 2012 at 17:32:52 +:
 On Tue, Feb 14, 2012 at 04:21:06PM +0200, Nadav Har'El wrote:
  On Tue, Feb 14, 2012, Daniel Shahaf wrote about Re: vim mappings for 
  Hebrew:
   :set keymap=hebrew
  
  Indeed. Vim has a very nice feature where it can emulate a Hebrew
  keyboard for editing, i.e., you never have to switch to Hebrew using your
  normal mechanism, rather you stay in English mode, and just when you
  edit vim itself will insert Hebrew letters instead of English.
  
  I have the following setup (you can put it in ~/.profile in VIMINIT, or
  in ~/.vimrc):
  
  map! F12 ^[:set invhk invrl^Ma 
  map  F12 :set invhk invrl^M 
  
  Note the ^M is a carriage return. What these mappings do is that F12,
  either in command or editing mode, will reverse the hebrew-keymap
  property (invhk), and reverse the screen direction (invrl).
 
  For UTF-8
 set al=1488
 
  The above from Nadav, using printable characters
 map! F12 esc:set invhk invrlcra
 map  F12  :set invhk invrlcr
 

The usual recommendation is to use ^O in insert mode, thus:

  map  F12  :set invhk invrlcr
  imap F12 C-OF12

Compared to your code this loses the mapping of F12 for command-line
mode (:edit, etc), but at the moment I don't recall what's the standard
way to make it apply there too.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Silly Debian E-mail question

2011-12-19 Thread Daniel Shahaf
In Mutt, ':set edit_headers' may be relevant.

Perhaps ask this on the Debian lists too?


Omer Zak wrote on Mon, Dec 19, 2011 at 23:20:10 +0200:
 I have two PCs in a LAN.  One PC has Debian Squeeze installed on it, and
 the other - Debian Wheezy.
 The Debian Squeeze PC has regular Internet access.
 The Debian Wheezy PC is blocked from sending E-mail to the Internet.
 
 I need to report a bug in Debian Wheezy.
 I ran reportbug on the blocked PC.
 Of course, it cannot send E-mail directly to the Debian bug tracking
 system.  I used the appropriate option to save the bug report as a file.
 The file is ready for transmission to my ISP's SMTP server - it has all
 the appropriate headers and MIME encodings etc.
 
 The problem:
 How to actually send the file?
 If I use my regular E-mail client (Evolution), and attach the bug report
 to my message, Debian BTS does not accept it.
 I have also mutt and bsd-mailx installed but I don't know if and how to
 use them to send the file.
 
 What should I RTFM in order to find how to actually send the file?
 
 The reportbug file begins as follows.
 
  Content-Type: multipart/mixed; boundary1048519724==
  MIME-Version: 1.0
  From: Omer Zak w...@zak.co.il
  To: Debian Bug Tracking System sub...@bugs.debian.org
  Subject: aptitude: Misreporting of DL Size
  Message-ID: 20111218173009.32124.91794.report...@c2.home.zak.co.il
  X-Mailer: reportbug 5.1.1
  Date: Sun, 18 Dec 2011 19:30:09 +0200
 
  This is a multi-part MIME message sent by reportbug.
 
 
  --===1048519724==
  Content-Type: text/plain; charset=us-ascii
  MIME-Version: 1.0
  Content-Transfer-Encoding: 7bit
  Content-Disposition: inline
 
  Package: aptitude
 
 Thanks,
 --- Omer
 
 
 -- 
 You haven't made an impact on the world before you caused a Debian
 release to be named after Snufkin.
 My own blog is at http://www.zak.co.il/tddpirate/
 
 My opinions, as expressed in this E-mail message, are mine alone.
 They do not represent the official policy of any organization with which
 I may be affiliated in any way.
 WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html
 
 
 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Goodbye, Lingnu

2011-11-14 Thread Daniel Shahaf
On Monday, November 14, 2011 1:14 PM, Nadav Har'El n...@math.technion.ac.il 
wrote:
 You can complete the job in less time if you stop thinking about selling
 time, and instead think about which jobs you can take which will allow you
 to *reuse* things you learned, and code you wrote, while working for previous
 clients. For example, if you just finished setting up a web front for a
 grocery store - and you developped all sorts of scripts and expertese to do
 so - go and find another grocery store as a client, because you can now do
 their job in half the time.

One doesn't learn new things by doing the same thing over and over.
Ideally some balance will be found...

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Scheduling a Meeting in a Cafe or Restaurant

2011-11-05 Thread Daniel Shahaf
On Saturday, November 05, 2011 3:43 PM, Shlomi Fish shlo...@shlomifish.org 
wrote:
 On Thu, 03 Nov 2011 19:01:32 +0200
 Daniel Shahaf d...@daniel.shahaf.name wrote:
  You might want to clarify what it would be about and why it can't be
  held over phone or instant messaging or smoke signals.
  
 
 The meeting would be about several FOSS enthusiasts meeting for chat and food,
 in real life, in a restaurant or a café somewhere in Tel Aviv, for the sake of
 having IRL chat and food. It can't be held over phone or IM because these are
 not enjoyable as meeting people face-to-face. I don't have a planned agenda 
 for
 the meeting, nor do I intend to prepare one - we'll talk about what we want
 there. 
 
 Hope I clarified it.
 

You did, thanks.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: umount and data is lost?

2011-11-05 Thread Daniel Shahaf
On Sunday, November 06, 2011 8:21 AM, Amos Shapira amos.shap...@gmail.com 
wrote:
 On 6 November 2011 08:12, Diego elc...@kde.org wrote:
   * disk is umounted using system(umount /data), and then I call from C to
  sync();
 
 
 Why not a direct umount(2) call?

Do you check the return value of system()?

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Scheduling a Meeting in a Cafe or Restaurant

2011-11-03 Thread Daniel Shahaf
On Thursday, November 03, 2011 6:16 PM, Shlomi Fish shlo...@shlomifish.org 
wrote:
 I don't see why a real-life meeting of people who share similar
 interests should be disallowed.

That's the first time you even hinted at what the meeting would be
about.

You might want to clarify what it would be about and why it can't be
held over phone or instant messaging or smoke signals.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Scheduling a Meeting in a Cafe or Restaurant

2011-11-03 Thread Daniel Shahaf
I was trying to ask the OP to clarify what he had wanted the asked
meeting to be be about.  Sorry to hear it came across sounding rude.

On Thursday, November 03, 2011 7:38 PM, Ori Idan o...@helicontech.co.il 
wrote:
 On Thu, Nov 3, 2011 at 7:01 PM, Daniel Shahaf d...@daniel.shahaf.namewrote:
 
  On Thursday, November 03, 2011 6:16 PM, Shlomi Fish 
  shlo...@shlomifish.org wrote:
   I don't see why a real-life meeting of people who share similar
   interests should be disallowed.
 
  That's the first time you even hinted at what the meeting would be
  about.
 
  You might want to clarify what it would be about and why it can't be
  held over phone or instant messaging or smoke signals.
 
 
 Why are you picking him.
 I understood from the first place that this is Shlomi's intention and thus
 don't see why people accused him of confusing jdate.co.il with linux-il.
 Also why talking about smoke signals etc. when I think everyone understand
 there are some advantages to face to face meetings.
 
 -- 
 Ori Idan
 

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Newer gcc swallow version control keywords

2011-10-17 Thread Daniel Shahaf
Shachar Shemesh wrote on Mon, Oct 17, 2011 at 22:47:49 +0200:
 On 10/17/2011 10:29 PM, Oleg Goldshmidt wrote:
  - did you try
  changing that to:
  static const volatile char foo_src_id[] = $Id$;
  Hmm... const volatile hadn't occurred to me before, but I have just
  tried it and it did not work.
 Just tested it myself. It does, indeed, not work. I wonder why? Seems
 like it SHOULD work. After all, that's what volatile is for, right?

Because it's also static?

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [OT] Self-employed's office

2011-10-13 Thread Daniel Shahaf
[sorry for delay; re-sending from my exempt-from-moderation address]

Michael Tewner wrote on Thu, Oct 06, 2011 at 07:00:27 +0200:
 Can you please share the helpful responses?
 -Mike
 

I'd be happy to --- with the permission of those who provided them.
I assume they would have included the list in the Cc if they had
intended for the responses to become public...

In any case, I'm BCC'ing the responders, and I'll repeat here the Any
academic institution or library suggestion that came to me via several
routes.

Sorry,

Daniel

 On Thursday, September 29, 2011, Daniel Shahaf d...@daniel.shahaf.name
 wrote:
  I got a few replies off-list, one of them in particular seems very
  promising; thanks to all who responded.
 
  Daniel Shahaf wrote on Sun, Sep 25, 2011 at 04:44:20 +0300:
  [ Hopefully this isn't too off-topic for this list. ]
 
  I'm located in the Tel-Aviv area.  These days I'm working remotely
  (under several different hats), but working from home is getting a bit
  long in the tooth, so I've been wondering what other options I have.
 
  ___
  Linux-il mailing list
  Linux-il@cs.huji.ac.il
  http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
 

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: [OT] Self-employed's office

2011-10-02 Thread Daniel Shahaf
I got a few replies off-list, one of them in particular seems very
promising; thanks to all who responded.

Daniel Shahaf wrote on Sun, Sep 25, 2011 at 04:44:20 +0300:
 [ Hopefully this isn't too off-topic for this list. ]
 
 I'm located in the Tel-Aviv area.  These days I'm working remotely
 (under several different hats), but working from home is getting a bit
 long in the tooth, so I've been wondering what other options I have.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


[OT] Self-employed's office

2011-09-28 Thread Daniel Shahaf
[ Hopefully this isn't too off-topic for this list. ]

I'm located in the Tel-Aviv area.  These days I'm working remotely
(under several different hats), but working from home is getting a bit
long in the tooth, so I've been wondering what other options I have.

There are cafés, of course, and a search has turned up coworking places
in Raanana, Tel-Aviv, and Modiin.  (I can post the links if there is
interest.)

So, the question I had was where can I work, and the above is the answer
I have so far.  I assume folks on this list might have further, different,
or better answers, and I'd be happy to hear some of them.

Thanks,

-- 
Daniel


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Fwd: [OT] Self-employed's office

2011-09-26 Thread Daniel Shahaf
Re-sending.  (I asked -owner@ why the original hadn't been moderated
through, but haven't heard back.)

- Forwarded message from Daniel Shahaf d...@daniel.shahaf.name -

 Date: Sun, 25 Sep 2011 04:44:02 +0300
 From: Daniel Shahaf d...@daniel.shahaf.name
 To: linux-il@cs.huji.ac.il
 Subject: [OT] Self-employed's office
 Message-ID: 20110925014402.GA10126@daniel3.local
 
 [ Hopefully this isn't too off-topic for this list. ]
 
 I'm located in the Tel-Aviv area.  These days I'm working remotely
 (under several different hats), but working from home is getting a bit
 long in the tooth, so I've been wondering what other options I have.
 
 There are cafés, of course, and a search has turned up coworking places
 in Raanana, Tel-Aviv, and Modiin.  (I can post the links if there is
 interest.)
 
 So, the question I had was where can I work, and the above is the answer
 I have so far.  I assume folks on this list might have further, different,
 or better answers, and I'd be happy to hear some of them.
 
 Thanks,
 
 -- 
 Daniel
 

- End forwarded message -

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il