euglug.org

[작성자:] admin

  • [Eug-lug] Source Code Processing



    Neil ParkerTue May 3 22:15:23 PDT 2005

    Jason Van Cleve wrote,
    >I'd like to process a whole bunch of source files uniformly, stripping
    >off any whitespace at the ends of lines and also making sure there is
    >exactly one newline before the EOF.  That last part may be tricky, but
    >is there a speedy *nix utility for getting rid of trailing whitespace,
    >or maybe for general source code processing?
    
    Regular Expressions Are Your Friend.
    
         sed 's/[ ^I]*$//' original_source.c > stripped_source.c
    
    (where "^I" means control-I, i.e. press the TAB key.  If you enter this
    directly on the command line [i.e. not in a script], you may need to press
    control-V first.)
    
    Or if you like your control characters visible, you can use perl:
    
         perl -pe 's/[ \011]*$//;' original_source.c > stripped_source.c
    
    Perl will even do a whole batch of files at once for you:
    
         perl -pi'orig_*' -e 's/[ \011]*$//;' file1.c file2.c file3.c ...
    
    saving the originals as "orig_file1.c", "orig_file2.c", etc.
    
                - Neil Parker
    
  • [Eug-lug] Smoothwall (www.smoothwall.org) experience?



    Walter HurstTue May 3 22:03:10 PDT 2005

    Hello,
    
    As a new member to this group, I gotta say that I'm impressed with the 
    amount of traffic and active users. I haven't had the chance to attend 
    any meetings yet but I hopefully will sometime this summer.
    
    Now onto my question...
    
    I was wondering if anybody has any experience with the Smoothwall 
    (www.smoothwall.org) linux-based firewall product. I need/want a 
    firewall for my home LAN, and heard about this product. In the past 
    I've used homespun linux configs for a firewall, but it was always a 
    low priority to maintain and would fall by the wayside. I was thinking 
    about buying a dedicated firewall device but this Smoothwall product 
    may fit the bill (if it does, does anybody have an old x86 box they 
    want to part with?). My one concern is that it looks like they've got a 
    corporate version with "extra" features - which makes me wonder if 
    they're limiting access to the linux internals (which you would 
    normally be able to tweak yourself).
    
    Thanks,
    
    Walter.
    
    
  • [Eug-lug] Source Code Processing



    larry priceTue May 3 21:59:47 PDT 2005

    On 5/3/05, Jacob Meuser <jakemsr at jakemsr.com> wrote:
    > On Tue, May 03, 2005 at 09:15:19PM -0700, Jason Van Cleve wrote:
    > > I'd like to process a whole bunch of source files uniformly, stripping
    > > off any whitespace at the ends of lines and also making sure there is
    > > exactly one newline before the EOF.  That last part may be tricky, but
    > > is there a speedy *nix utility for getting rid of trailing whitespace,
    > > or maybe for general source code processing?
    
    if you want speed try sed(1)
    
    s/[\w]*$//g #remove any number of white space characters before end of line
    s/^$//g #remove blank lines
    
    followed by 
    echo >> $file #append a blank line to the end of the file.
    
    although if you are getting fancy you might want to rewrite it in perl
    or $language
    to do manipulation or insertion.
    
    having done a fair amount of stuff recently that required mucking about with
    line end conversions and preprocessing files for a finicky parser
    this is where find(1) is your friend
    
    build your manipulation script and let find pass files to it.
    (it's also a good idea to make a copy of the target files before you
    munge them so that you can recover from your mistakes while you are
    figuring out your regex)
    
  • [Eug-lug] Source Code Processing



    Jacob MeuserTue May 3 21:28:38 PDT 2005

    On Tue, May 03, 2005 at 09:15:19PM -0700, Jason Van Cleve wrote:
    > I'd like to process a whole bunch of source files uniformly, stripping
    > off any whitespace at the ends of lines and also making sure there is
    > exactly one newline before the EOF.  That last part may be tricky, but
    > is there a speedy *nix utility for getting rid of trailing whitespace,
    > or maybe for general source code processing?
    
    indent(1) lint(1) expand(1) unexpand(1)
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] Source Code Processing



    Jason Van CleveTue May 3 21:15:19 PDT 2005

    I'd like to process a whole bunch of source files uniformly, stripping
    off any whitespace at the ends of lines and also making sure there is
    exactly one newline before the EOF.  That last part may be tricky, but
    is there a speedy *nix utility for getting rid of trailing whitespace,
    or maybe for general source code processing?
    
    --Jason V. C.
    
    --
    If you drink, don't park, accidents cause people.
    
  • [Eug-lug] Roll your own system… or not



    Max LemieuxTue May 3 09:30:59 PDT 2005

    Excellent. I didn't try that method; and the power supply explains why 
    removing the battery for a few minutes didn't do it. I wasn't aware that 
    it acts as a capacitor to that extent... thanks
    
    
    --Max
    
    Mr O wrote:
    > Did you power the machine up after moving the jumper? On some
    > BIOS's you boot up and set clear all passwords, save & exit,
    > poweroff and put the jumper back. Try that sometime if you're in
    > the machine again anytime.
    > 
    > Also, as for just pulling the battery, don't forget to pull the
    > power cord and hit the power button a couple times to drain as
    > much power from the power supply as you can. 
    > 
    > 
    > --- Max Lemieux <max at lunarlogic.com> wrote:
    > 
    >>Yeah, I tried the jumper... both on the other position, and
    >>off 
    >>entirely, for a couple minutes each time. No luck. Same with
    >>the CMOS 
    >>battery, 5 minutes out didn't clear it...
    > 
    > 
    > 
    > 
    > 		
    > __________________________________ 
    > Do you Yahoo!? 
    > Yahoo! Small Business - Try our new resources site!
    > http://smallbusiness.yahoo.com/resources/ 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] Roll your own system… or not



    Mr OTue May 3 09:24:20 PDT 2005

    Did you power the machine up after moving the jumper? On some
    BIOS's you boot up and set clear all passwords, save & exit,
    poweroff and put the jumper back. Try that sometime if you're in
    the machine again anytime.
    
    Also, as for just pulling the battery, don't forget to pull the
    power cord and hit the power button a couple times to drain as
    much power from the power supply as you can. 
    
    
    --- Max Lemieux <max at lunarlogic.com> wrote:
    > Yeah, I tried the jumper... both on the other position, and
    > off 
    > entirely, for a couple minutes each time. No luck. Same with
    > the CMOS 
    > battery, 5 minutes out didn't clear it...
    
    
    
    		
    __________________________________ 
    Do you Yahoo!? 
    Yahoo! Small Business - Try our new resources site!
    http://smallbusiness.yahoo.com/resources/ 
    
  • [Eug-lug] Roll your own system… or not



    Max LemieuxTue May 3 09:20:13 PDT 2005

    Yeah, I tried the jumper... both on the other position, and off 
    entirely, for a couple minutes each time. No luck. Same with the CMOS 
    battery, 5 minutes out didn't clear it...
    
    The IBM engineering seems to be pretty nice. The case design is clever 
    (at least to my untrained eyes) and 5.25" drive installation was 
    straightforward.
    
    Since the 300GL is banished to my remote workshop, with only power 
    lines, I think I will see if I can get wireless up and running on it... 
    I have a spare 802.11g PCI card kicking around :D
    
    -Max
    
    Mr O wrote:
    > CR2032 is right. Generally on most motherboards (even
    > proprietary crap) there's a jumper near the CMOS battery to
    > clear it which takes about 15 seconds. Hope that helps you next
    > time around or anyone else dealing with a similar PC. 
    > 
    > Ze' Hardware Guru,
    > Mr O.
    > 
    > 
    > --- Max Lemieux <max at lunarlogic.com> wrote:
    > 
    > 
    >>1) Curse at BIOS password for a couple hours
    >>2) Get smart and remove CMOS battery for a couple hours
    >>(CR-2032 IIRC)
    >>
    > 
    > 
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam?  Yahoo! Mail has the best spam protection around 
    > http://mail.yahoo.com 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] [SO/OT} anyone bluetooth ???



    JamieMon May 2 23:31:41 PDT 2005

    >  The 2nd reason for going the cable route was to explore some cool phone
    > hacks available only via cable, not via BT. I haven't played with those
    > yet, but what I see in 'the literature' reminds me at the days of the
    > 'Byte Jumper' for the HP-41C ...((only the old farts may remember what I
    > am talking about))
    
    the 41C was a sweet machine, but I liked the 71b much better, as it had a 
    bigger display, and more a keyboard like keyboard.
    Sadly, I never had my own of either, but I did get to play with other peoples, 
    and at hp... 
    
    >
    > So much for now........................................Horst
    
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    
    
  • [Eug-lug] [SO/OT} anyone bluetooth ???



    horstMon May 2 23:09:09 PDT 2005

    > Date: Tue, 26 Apr 2005 22:38:21 -0700 (PDT)
    > From: Mr O <notanatheist at yahoo.com>
    ...
    >
    > Let us know what you accomplish.
    >
    
    OK, you asked for it --so here are my first impressions (it's all pretty
    new)
    
    About the headset (more correctly described as earset):
    -----------------
     I got an HS820. I decided to stay with Motorola to interface most
    seamlessly. The deal came with the same charger as the phone, plus a
    Y-splitter to charge phone and headset simultaneously; that's a bonus as I
    can keep the second charger at work.
     I took it on a bike ride along the river, and the sound quality is as
    good, or better, than the built-in mike. Kind of cool to keep both hands
    on the handle bars and enjoy a quality conversation at the same time
    (except that the joggers look at you as if you are not all there --but
    that's not really a problem in Eugene)
     Although only 0.7 oz, the batteries promise 6/100 hrs talk/standby time.
    The light weight is very comfortable, although I am wondering how well the
    thing will stay in place, my ear that is, if the ride gets rough; no
    problem on paved bike lanes, but when I start jumping curbs, and doing
    other things middle age men shouldn't engage in, I don't know yet...
     There also seems to be a bug in the Motorola software as not all of my
    incoming/outgoing calls got logged properly (but that may be not just
    headset-specific)
    
    About the PC link:
    ------------------
    My original thought was to do it via BT to spend money once, and then
    reuse the system with the next phone, and the phone afterwards... But
    Mike's warning, and several web post made me worry about
    compatibility/proprie-terriblty issues. So I went for the straight USB
    cable connection.
     The 2nd reason for going the cable route was to explore some cool phone
    hacks available only via cable, not via BT. I haven't played with those
    yet, but what I see in 'the literature' reminds me at the days of the
    'Byte Jumper' for the HP-41C ...((only the old farts may remember what I
    am talking about))
    
    So much for now........................................Horst
    
    BTW, if you have a BT phone parked near a radio or a cheap CD player
    you'll hear a lot of RF noise when a call is coming in; something to keep
    in mind when using nearby other wireless devices.
    
    
     > > > ---
    horst <horsu at freeshell.org> wrote: > > ...as in [Somewhat On/Off Topic]
    > >
    > > I got a cell phone with bluetooth capability. It's a Motorola
    > > V551.
    > >   I have no hands-on experience with bluetooth but can see how
    > > this
    > > technology could benefit me in at at least 2 areas:
    > >
    > >   1) Wireless ear/headset while riding the bike (or driving a
    > > car).
    > >     Does it require a proprietary Motorola headset to catch an
    > > incoming
    > > call over the headset? (standard headphones /w cord won't do
    > > it)
    > >   ((Reason: I miss many of my incoming calls because of
    > > surrounding noise
    > > level at rush hour commute, with the phone in the backpack))
    > >   Anyone any comment ?
    > >
    > > 2) Link to a PC: to backup phonebook, calendar, photos, etc.
    > > and hopefully
    > > editing the data, and stream it back to the cell (editing
    > > anything using
    > > that tiny key pad on the cell is a pain in the Hintern.
    > >
    > >   Now about hardware/software for doing the PC link --I assume
    > > that will be
    > > done via USB ?  (I have a fairly old PC tower)
    > >
    > > What do I need to be aware of to not get locked in into some
    > > M$ trap?
    > >