postgres reusing sequences in error duplicates

This happened:

wake up today, some groups look screwed up, they’re using “duplicate sequences” in their systems, what the heck? how could a sequence be reused? [postgres]

Well, looking back, looks like the database server box was rebooted about the time this occurred.  In my mind this means a “bad shutdown” of postgres [hard kill?] so it didn’t have a chance to serialize the latest seuqence values to disk, so when it came up, it reused some sequences. though by default they are atomic, and save, never reused [when boxes rebooted correclty]. scary! [not sure if it’s postgres fault here].

Hunch as to real fix: gracefully shut down postgres *before* rebooting boxes [shouldn’t it automatically do this for us anyway though? through some init.d shutdown system? I dunno].

digitalocean how to get free backups/long term backups

basically, you can backup files “for free” by creating a new box, then copy the files out to it, shut it down, snapshot it, destroy it.  the snapshot has your files on it “free backup space!” LOL

The other option if you want longer term backups for your droplet is to take one of your weekly backups, create a box with it, snapshot it, destroy it.  Long term backup created!

pipelight to watch amazon instant video ubuntu linux

OK I think you can do this with normal flash, but if you want to go the pipelight route:


$ sudo pipelight-plugin –enable silverlight

then adjust your user-agent, like

Name/abc:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1

if you’re using

now you can use silverlight.  sadly it doesn’t seem to support/allow for HD streaming “no HDCP support found” or the like.


ref here

maybe can/should disable your flash plugin, and/or set your “web player preferences” to be silverlight?

oracle woe

SQL> select ctr_id from table where updt_ts >TO_DATE(‘2003/07/09′, ‘yyyy/mm/dd’) AND updt_ts < TO_DATE(‘2003/07/10’, ‘yyyy/mm/dd’) AND rownum < 5;
ORA-01756: quoted string not properly terminated



select ctr_id from table where updt_ts BETWEEN TO_DATE(‘2014/12/18’, ‘yyyy/mm/dd’) AND TO_DATE(‘2014/12/19’, ‘yyyy/mm/dd’)
AND rownum < 5;SQL> 2
select ctr_id from table where updt_ts BETWEEN TO_DATE(‘2014/12/18’, ‘yyyy/mm/dd’) AND TO_DATE(‘2014/12/19’, ‘yyyy/mm/dd’)
ERROR at line 1:


all meant “one (1) of those quotes is actually a ‘smart’ backquote). Yikes.

os x mac oracle sqlplus woe

dbc11.dylib uidrvci
glogin.sql libsqlplus.dylib xstreams.jar
libclntsh.dylib.11.1 libsqlplusic.dylib
rdp-mbp:instantclient_11_2 packrd$ ./sqlplus
dyld: Library not loaded: /ade/dosulliv_sqlplus_mac/oracle/sqlplus/lib/libsqlplus.dylib
Referenced from: /Users/packrd/Downloads/instantclient_11_2/./sqlplus
Reason: image not found
Trace/BPT trap: 5
rdp-mbp:instantclient_11_2 packrd$ pwd
rdp-mbp:instantclient_11_2 packrd$ export DYLD_LIBRARY_PATH=`pwd`
rdp-mbp:instantclient_11_2 packrd$ ./sqlplus

meant this

export DYLD_LIBRARY_PATH=`pwd` # wherever you had the rest of the stuff unzipped like

it might also mean that you need to “unzip” both into the same folder…kind of…that might help anyway

lua how to cross compile (mingw liblua.a file)

Appears that “mingw” platform target is just shared.

“generic” platform target is not. Apparently. So.


build_lua() {
download_and_unpack_file lua-5.1
cd lua-5.1
export AR=”${cross_prefix}ar rcu” # needs a parameter :|
do_make “CC=${cross_prefix}gcc RANLIB=${cross_prefix}ranlib generic” # generic == static :)
unset AR
do_make_install “INSTALL_TOP=$mingw_w64_x86_64_prefix”
#cp etc/lua.pc $PKG_CONFIG_PATH
cd ..

can you legally share comcast internet in multiunit 4plex?/centurylink/utopia

IANAL, but according to comcast’s acceptable use policy, sharing it outside your “apartment building” is illegal, so I’d say within one is ok [for business internet].  Sharing residentail comcast probably not.

Qwest business doesn’t “disallow it”/centurylink.

Utopia most providers say “no resell” however xmission doesn’t, chat them and ask questions about it, they seemed OK with my sharing it as long as I maintained my “internal” network, as it were, and they didn’t.