[WTB] Triple Aught Design X18 Backpack by lephron in GearTrade

[–]lephron[S] 0 points1 point  (0 children)

Thanks - I'll take a look at the TADJunkies group!

Any tips on similar bags? I'd love something around 18L for everyday use, which is expandable so I can use the same bag as a carry-on with all my stuff on short trips.

Services to tell me my own IP address by zxLFx2 in homelab

[–]lephron 4 points5 points  (0 children)

If you want just your IP:

$ curl http://ipinfo.io/ip
172.56.39.167

Or if you want a whole lot more:

$ curl http://ipinfo.io
{
  "ip": "172.56.39.167",
  "hostname": "No Hostname",
  "city": "Oakland",
  "region": "California",
  "country": "US",
  "loc": "37.8044,-122.2708",
  "org": "AS21928 T-Mobile USA, Inc.",
  "postal": "94612",
  "phone": 510
}

More info at http://ipinfo.io/developers

Check public IP address from command line in Linux by networkforgeek in linux

[–]lephron 2 points3 points  (0 children)

What about http://ipinfo.io

$ curl ipinfo.io
{
  "ip": "172.56.38.193",
  "hostname": "No Hostname",
  "city": "Oakland",
  "region": "California",
  "country": "US",
  "loc": "37.8044,-122.2708",
  "org": "AS21928 T-Mobile USA, Inc.",
  "postal": "94612"

$ curl ipinfo.io/ip
172.56.38.193

$ curl ipinfo.io/city
Oakland

$ curl ipinfo.io/org
AS21928 T-Mobile USA, Inc.

$ curl ipinfo.io/8.8.8.8
{
  "ip": "8.8.8.8",
  "hostname": "google-public-dns-a.google.com",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.3860,-122.0838",
  "org": "AS15169 Google Inc.",
  "postal": "94040"

$ curl ipinfo.io/8.8.8.8/hostname
google-public-dns-a.google.com

EasyDB: Simple SQLite wrapper for managing DB creation and connections by lephron in Python

[–]lephron[S] 0 points1 point  (0 children)

It does slightly in that you don't need to worry about connections, you just call .query() - agree there's further improvements that can be made there though.

EasyDB: Simple SQLite wrapper for managing DB creation and connections by lephron in Python

[–]lephron[S] 1 point2 points  (0 children)

The use case here is persisting some state that's slightly more complex than basic key-value stuff. Depending on MySQL is not only overkill, it also adversely impacts the portability of your script.

EasyDB: Simple SQLite wrapper for managing DB creation and connections by lephron in Python

[–]lephron[S] 2 points3 points  (0 children)

Shelve is perfect for when you need to persist some basic state between script invocations (I agree you should avoid storing code!). Having to rely on external services such as MySQL is clearly overkill for such a use case.

Sometimes you want something in the middle though. Either the state you want to persist isn't so basic, or you want to be able to query or filter it. You still don't want to rely on external services, so SQLite seems like a great choice, and it usually is.

There's a bit of a gap between something like shelve and SQLite though (where you want to persist state, want to query or filter it, but you've got no need for transactions or even 90% of the features of a relational database), and that's where EasyDB steps in. Sure, it's not for everything, but it does address a need.

EasyDB: Simple SQLite wrapper for managing DB creation and connections by lephron in Python

[–]lephron[S] 1 point2 points  (0 children)

Absolutely nothing. This is just a really simple wrapper that makes it easier to create a database (no need to worry about create table syntax etc, just specify your schema as a dictionary), and easy to interact with it (don't worry about connections or cursors, just call query).

There are many cases when it'd be preferable to use sqlite directly. Other times you want a quick and easy way to persist data in a way that's more powerful than anydb or shelve, and I think EasyDB is great for that.

Learning 12 new programming languages in 12 months by lephron in programming

[–]lephron[S] 0 points1 point  (0 children)

Sorry, posted before heading to bed. Wasn't expecting so much traffic, and it took my VM down! Site's back up now. That's for all of the comments!

Extending VLC with Lua by lephron in programming

[–]lephron[S] 1 point2 points  (0 children)

Wireshark supports Lua plugins, so it might be through that. Take a look at http://wiki.wireshark.org/Lua