| Andrew Cooke | Contents | Latest | RSS | Twitter | Previous | Next

C[omp]ute

Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Lepl parser for Python.

Colorless Green.

Photography around Santiago.

SVG experiment.

Professional Portfolio

Calibration of seismometers.

Data access via web services.

Cache rewrite.

Extending OpenSSH.

Last 100 entries

Santiago 30m Bike Route; Mapa de Ciclovias en Santiago; How Unreliable is UDP?; SE Santiago 20m Bike Route; Cameron's Rap; Configuring libxml with Eclipse; Reducing Combinatorial Complexity With Occam - AI; Sentidos Comunes (Chilean Online Magazine); Hilary Mantel: The Assassination of Margaret Thatcher - August 6th 1983; NSA Interceptng Gmail During Delivery; General IIR Filters; What's happening with Scala?; Interesting (But Largely Illegible) Typeface; Retiring Essentialism; Poorest in UK, Poorest in N Europe; I Want To Be A Redneck!; Reverse Racism; The Lost Art Of Nomography; IBM Data Center (Photo); Interesting Account Of Gamma Hack; The Most Interesting Audiophile In The World; How did the first world war actually end?; Ky - Restaurant Santiago; The Black Dork Lives!; The UN Requires Unaninmous Decisions; LPIR - Steganography in Practice; How I Am 6; Clear Explanation of Verizon / Level 3 / Netflix; Teenage Girls; Formalising NSA Attacks; Switching Brakes (Tektro Hydraulic); Naim NAP 100 (Power Amp); AKG 550 First Impressions; Facebook manipulates emotions (no really); Map Reduce "No Longer Used" At Google; Removing RAID metadata; New Bike (Good Bike Shop, Santiago Chile); Removing APE Tags in Linux; Compiling Python 3.0 With GCC 4.8; Maven is Amazing; Generating Docs from a GitHub Wiki; Modular Shelves; Bash Best Practices; Good Emergency Gasfiter (Santiago, Chile); Readings in Recent Architecture; Roger Casement; Integrated Information Theory (Or Not); Possibly undefined macro AC_ENABLE_SHARED; Update on Charges; Sunburst Visualisation; Spectral Embeddings (Distances -> Coordinates); Introduction to Causality; Filtering To Help Colour-Blindness; ASUS 1015E-DS02 Too; Ready Player One; Writing Clear, Fast Julia Code; List of LatAm Novels; Running (for women); Building a Jenkins Plugin and a Jar (for Command Line use); Headphone Test Recordings; Causal Consistency; The Quest for Randomness; Chat Wars; Real-life Financial Co Without ACID Database...; Flexible Muscle-Based Locomotion for Bipedal Creatures; SQL Performance Explained; The Little Manual of API Design; Multiple Word Sizes; CRC - Next Steps; FizzBuzz; Update on CRCs; Decent Links / Discussion Community; Automated Reasoning About LLVM Optimizations and Undefined Behavior; A Painless Guide To CRC Error Detection Algorithms; Tests in Julia; Dave Eggers: what's so funny about peace, love and Starship?; Cello - High Level C Programming; autoreconf needs tar; Will Self Goes To Heathrow; Top 5 BioInformatics Papers; Vasovagal Response; Good Food in Vina; Chilean Drug Criminals Use Subsitution Cipher; Adrenaline; Stiglitz on the Impact of Technology; Why Not; How I Am 5; Lenovo X240 OpenSuse 13.1; NSA and GCHQ - Psychological Trolls; Finite Fields in Julia (Defining Your Own Number Type); Julian Assange; Starting Qemu on OpenSuse; Noisy GAs/TMs; Venezuela; Reinstalling GRUB with EFI; Instructions For Disabling KDE Indexing; Evolving Speakers; Changing Salt Size in Simple Crypt 3.0.0; Logarithmic Map (Moved); More Info; Words Found in Voynich Manuscript

© 2006-2013 Andrew Cooke (site) / post authors (content).

PPOE on OpenSuse

From: "andrew cooke" <andrew@...>

Date: Wed, 10 Dec 2008 17:48:14 -0300 (CLST)

Just got a new internet connection via the phone company (ASDL) rather
than cable TV.

The following comments probably don't apply to most people, but I use my
Linux (opensuse 11) box directly as the main firewall/router (rather than
connecting the phone company's mode to a wireless router or whatever).

That means I had to configure Linux to talk PPPOE, which was a little
frustrating.  As far as I can tell the YAST scripts are buggy - they tend
to hang and prompt for inconsistent fields.

After going round in many circles, I don't have a clear idea of what I
did, but basically to convert from ethernet/cable to PPOE You seem to need
to:

- Install the smpppd daemon (including chkconfig -a)
- Disable named if you are using it
- Use YaST Network Devices pane:
-- In Network Settings change the "external" network card to have no
   address and no DHCP
-- In DSL create a new entry (PPP over Ethernet) with a new provider
   selecting the options "Modify DNS when connected", "Automatically
   Retrieve DNS" and "Automatically Reconnect"
- Reboot

I haven't found any alternative to rebooting (/etc/init.d/network restart
doesn't cut it).

Note that I haven't yet got local DNS working (I disabled it because it
was making everything else more complex).

Andrew

Slowly making more sense

From: "andrew cooke" <andrew@...>

Date: Wed, 10 Dec 2008 22:44:41 -0300 (CLST)

OK, to create the dsl0 interface, use
  ifup dsl0
similarly, to take it down
  ifdown dsl0

And named (bind) works just fine - follow the instructions in
/etc/resolv.conf to stop ppp from updating the DNS (and update the
resolvers list for named if necessary)

Andrew

Script to Check for dsl0

From: "andrew cooke" <andrew@...>

Date: Sun, 14 Dec 2008 09:31:31 -0300 (CLST)

The dsl0 device was down this morning; I have added the following script
to /etc/cron.hourly so that it is brought back up automatically:

#!/bin/bash

log="/var/log/smpppd/check.log"

touch "$log"
date >> "$log"

exists=`ifconfig | grep dsl0`
if [ "$exists" ]
then
  echo "dsl0 exists" >> "$log"
else
  echo "dsl0 down" >> "$log"
  ifup dsl0 >> "$log" 2>&1
fi

However, the current setup involves having a satellite dish (ISP provides
digital TV too) and there's a rumour the neighbours are unhappy, so I
don't know what will happen in the future...

Andrew

Updated PPOE Script, Extra Tricks for WebMail

From: "andrew cooke" <andrew@...>

Date: Sat, 10 Jan 2009 09:04:38 -0300 (CLST)

I've updated the script (below) to include knockd which, if you use it,
must also be restarted (otherwise you will be locked out of the system,
presumably).  Remove the block of lines associated with knockd if it is
not used.

The retry loop is not really needed, but the sleep is (ifup returns before
knockd can be started).

Also, this seems to allocate a new address.  If you are using a dynamic
address (eg dyndns) then it will update, but the cache on the machine you
are using to access my be incorrect.

There are actually two caches: the OS cache and one in Firefox.  To flush
the Linux cache, use
  sudo /etc/init.d/nscd restart
(the Name Service Cache Daemon caches names...).  To fix Firefox either
exit and restart or follow the instructions at
http://www.techiecorner.com/225/how-to-disable-firefox-dns-cache/ (you
still need to restart the first time you do that, but not in future).

Andrew


#!/bin/bash

# must be run by root

log="/var/log/smpppd/check.log"

touch "$log"
date >> "$log"

for retry in [1,2,3]
do
  exists=`ifconfig | grep dsl0`
  if [ "$exists" ]
  then
    echo "dsl0 exists" >> "$log"
  else
    echo "dsl0 down" >> "$log"
    ifup dsl0 >> "$log" 2>&1
    echo "pause 10 secs..." >> "$log"
    sleep 10
  fi
done

running=`/etc/init.d/knockd status | grep run`
if [ "$running" ]
then
  echo "knockd running" >> "$log"
else
  echo "knockd unused" >> "$log"
  /etc/init.d/knockd start >> "$log" 2>&1
fi

PPPoE on OpenSuse 12.3

From: andrew cooke <andrew@...>

Date: Thu, 11 Apr 2013 10:01:14 -0300

Some things never change :o)

Found out how to get my modem into "bridge mode" and so am using PPPoE again.

Note that Yast config of DSL is broken.  You can use it to configure (once!)
but then it doesn't show the configured DSL.  Despite that, if you are
careful (yo uhave only one try!) you can get it to work...

https://bugzilla.novell.com/show_bug.cgi?id=804009

Andrew

Comment on this post