Listen to 'On The Telephone' by Robin Crosbie
http://bln.kr/YWQ/Tuesday, 25 January 2011
Thursday, 12 August 2010
link specific facebook link
problem: went on a posting spree, wanted to promote a particular post. how do you do this?
what im not doing: using any 3rd party services, or searching through the notifications, it might not even be there if no-ones posted.
ok, so first i found a post by someone that had enough comments to get its own page. this was the post (link takes you to)
http://www.facebook.com/LimmyDotCom?v=wall&story_fbid=119754138073776#!/LimmyDotCom?v=wall&story_fbid=119754138073776
but, if you copy and paste this it reduces to
http://www.facebook.com/LimmyDotCom?v=wall&story_fbid=119754138073776
but, where to find the story_fbid? well, if you go to your own profile and right click the 'remove' post, and copy the link address. example here
http://www.facebook.com/ajax/minifeed/remove_confirm.php?story_id=div_story_990355814_142328365798594&profile_id=100000228722293&story_key=5504271594602596862&story_type=22&app_link=%3Ca+href%3D%22http%3A%2F%2Fapps.facebook.com%2Fpingdotfm%2F%22%3EPing.fm%3C%2Fa%3E&handler=prof
story_id, from the 3rd underscore is the story_fbid. so, the url (using my own username would be)
http://www.facebook.com/thefamousnomo?v=wall&story_fbid=142328365798594
job done!
Tuesday, 1 June 2010
clearos5.1 migration, cont
problem: continuing migration
what im not doing: worrying
as a domian with clearos as pdc is would be considered a big upgrade, and the charge is to get this network back to production im sticking with wins the now. there is loads via google about your smb.conf and entries to make it wins server, but im going with the web admin panel for this one. so, enabling wins adds the following to /etc/samba/smb.conf
# WINS
wins support = Yes
wins server =
this isnt quite right yet, as one of the workstations doesnt always show up in 'net view'. may have to revisit and experiment as i suspect the server and workstation are battling for browse master status. also, added this to /etc/nsswitch.conf to enable wins resolution for the server, just to keep remote admin a wee bit easier until i migrate to full domain
hosts: wins files dns
:D
Wednesday, 19 May 2010
clearos5.1 migration, cont
problem: continuing migration
what im not doing: worrying
ran into some issues with fetchmail. to save time i copied the config file (/etc/fetchmail) from the old clarkconnect4.2 server and ran into problems straight away. seems the new server wants pop usernames, password and local usernames in quotes now! fixed file, but got the following error
client/server protocol error while fetching from blah-blah-blah
not much help! so, ssh'd in and ran the following
service fetchmail stop
fetchmail -v -f /etc/fetchmail -L ~/fetch
which is running fetchmail verbosely with the config file outputting to log in my home called fetch. i was able to note the following error
opportunistic upgrade to TLS failed, trying to continue.
obviously, not able to continue. to i googled around and found a few fixes that never worked. i then modified one of the fixes found by adding the following to the end of each account entry in the config file
sslproto ""
and all is well again!
Thursday, 13 May 2010
clearos5.1 migration, cont
problem: continuing migration
what im not doing: worrying
although the web interface allows the sharing of users homes, it doesnt allow for a public shared folder as clarkconnect4.2 did... as i was used to this i copied the relevant section of the old smb.conf (/etc/samba/smb.conf) and appended it to the new servers config file. this also features a wee addendum for sharing the servers dvd drive as the small form factor client machines in the office are cd-rom only.
[shared]
comment = Public shared folder
path = /home/shared
browseable = yes
guest only = yes
writeable = yes
public = yes
[dvd]
comment = DVD
path = /mnt/hdd
writeable = no
locking = no
then the usual
service smb restart
at the moment im still having to manually mount dvds after insertion, but will get around to autofs or similar.
Tuesday, 27 April 2010
clearos5.1 migration, cont
problem: continuing migration
what im not doing: giving in
now that i had a bootable system i selected all required packages from the web interface. after a while, all the expected options were available and we were getting somewhere! while scanning through all the new options i found that the mail-antispam page was blank... a bit of googling returned that this is a bit of a bug (undocumented) that arises if the package is installed post-os-install. seems that
Postgrey.class.php
is missing. found the following fix
wget http://download1.clearfoundation.com/clearos/enterprise/5.1/System/RPMS/app-greylisting-5.1-20.i386.rpm
rpm -Uvh app-greylisting-5.1-20.i386.rpm
but this is where i met an old problem. for some reason our router resolves some internet addresses to
1.0.0.0
and i have had limited success when removing ipv6 on the host. as a deb head, this is done by appending
install ipv6 /bin/true (always returns 0)
to
/etc/modprobe.conf
then updating / adding
NETWORKING_IPV6=no
IPV6INIT=no
to
/etc/sysconfig/network
then
service network restart
rmmod ipv6
(didnt work, had to reboot)
but, alas... problem remained. so, changed the dns address in
/etc/resolv
service network restart
to an open dns address, and all went well. mail-antispam was all good. however, i recalled with clarkconnect4.2 when the host dns address didnt match the auto-supplied router dns address for pptpd (still stuck on wins, no local dns), although remote connection was fine, it caused an issue with routing and the remote lan wasnt available from the remote host. so, some remote testing was next.
remote tests proved fine, must have been an issue with clarkconnect4.2!
now to setting the server up for production...
Sunday, 25 April 2010
clearos5.1 migration
problem: got to migrate from clarkconnect4.2 to clearos5.1
what im not doing: considering any other server / gateway os just yet
so, during the above adventure, i have came across a few problems. the first was after initial setup and testing (very basic install, add only required packages) i tried to change the hostname via the web interface. this caused some sort of lock-up and the machine had to be hard rebooted. the boot sequence started to crawl around loading of the hal daemon and then slapd, so i booted into rescue mode via the cd, chrooted the system partition and had a look around. first stop was to check all network script and config files as i wasnt sure the hostname change was good. so, first checked
/etc/hosts
and all looked good. then checked
/etc/sysconfig/network and /etc/sysconfig/networking-scripts/ifcfg-eth0
and and found a hostname conflict in /etc/sysconfig/network. i also checked
/etc/resolv
to ensure that dns settings were good. they were, but more on that later...
rebooted and started up no probs! first hurdle!
Sunday, 18 April 2010
postfix deferred email requeue
problem: clarkconnect4.2 deferring all emails because clamav0.9x now unsupported
what im not doing: losing them
first, though i would just be able to uninstall cc-clamav (and related) then reinstall them. so
apt-get remove cc-clamav
then
apt-get install cc-clamav
without joy! no cc-clamav... so
apt-cache search *clam*
nothing... found support for 4.2 ended nov2009...
as im still on holiday will rely on clients antivirus until im 'back at work', but still 171 emails deferred due to clamav error. looked into postfix commands and found
postsuper
so to requeue
postsuper -r ALL (uppercase for security)
and get ready to migrate server
Tuesday, 6 April 2010
mysql memory leak - not the database, ME!
problem: keep forgetting this for some reason
what im not doing: googling it and rattling through 4-5 site before i find 'the one'
what im not doing: googling it and rattling through 4-5 site before i find 'the one'
so, here it is... find auto-increment value of database
SHOW TABLE STATUS LIKE 'table_name';
and, reset the value
ALTER TABLE tablename AUTO_INCREMENT = value;
and if i have to insert somewhere in the middle
SET insert_id = value;
then run insert query
meaning to log this for ages!
Thursday, 11 June 2009
javascript string to int
problem: javascript is strange at the best of times, but i just couldnt figure out why i was getting an error
what im not doing: dwelling on it... javascript is as good as broken in some of its strange ways...
kept getting errors in simple math comparison... it occurred to me that one input was being treated as a string! so,
(parseInt(document.getElementById('whatever').value)<parseint(some_string_as_it_turns_out)))
and all was good again.
Tuesday, 24 February 2009
mysql order by
problem: selecting some columns from table, one sum of entries. cant seem to order by sum...
what im not doing: reverting to batch sorting or anything like that
3 columns, 'qty' and 'code', int, varchar(20) loaded from csv using the following;
create database inv;
create table in (
qty int,
code varchar(20)
);
load data local infile 'c:/inv.csv' into table in
fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n'
(qty, code)
;
and im looking for sum of all qtys, grouped by codes, all qtys < 6;
select sum(qty) as count from in group by code having count < 6
fields terminated by ','
lines terminated by '\r\n'
;
obviously this outputs to a local file. the key is 'as count' & 'having count < 6'. job done :D
Wednesday, 11 February 2009
ActiveX runtime error 429 when creating Lotus Notes object from VBA
Problem:
vba code creates Lotus Notes object, initiates the session and sends email. However the Notes registry needs updated and the users dont have access to C: drive to run the reg file.
solution:
create a batch file which will run the reg fix:
#######################################
Windows Registry Editor Version 5.00
Regedit.exe /s C:\Lotus\Notes\NOTESW32.REG
Regedit.exe /s C:\Lotus\Notes6\NOTESW32.REG
#######################################
save as a .bat file and run!
vba code creates Lotus Notes object, initiates the session and sends email. However the Notes registry needs updated and the users dont have access to C: drive to run the reg file.
solution:
create a batch file which will run the reg fix:
#######################################
Windows Registry Editor Version 5.00
Regedit.exe /s C:\Lotus\Notes\NOTESW32.REG
Regedit.exe /s C:\Lotus\Notes6\NOTESW32.REG
#######################################
save as a .bat file and run!
Friday, 6 February 2009
Rebuild Boot.ini
Problem – winblows will not boot. Common errors are NTLDR Missing; Invalid boot.ini;
what im not doing:
a reinstall (just yet!)
boot into Recovery Console:
go to root;
> CD..
remove hidden, System & Read Only Flags;
> ATTRIB -H C:\\BOOT.INI
> ATTRIB -R C:\\BOOT.INI
> ATTRIB -S C:\\BOOT.INI
Delete the knackered boot file;
> DEL BOOT.INI
Rebuild the boot file.
>BOOTCFG /REBUILD
First, every Windows XP owner must use /FASTDETECT as an OS Load Option when the rebuild process is finalizing. Secondly,
if you are the owner of a CPU featuring Intel’s XD or AMD’s NX buffer overflow protection, you must alsou use /NOEXECUTE=OPTIN as an OS Load Option.
For the “Enter Load Identifier” enter the OS name - ie “Microsoft Windows XP Home Edition”
or be a smart arse and write something personalised.
> BOOTCFG /REBUILD
> FIXBOOT
Unable to Create Shortcut on Vista
more proof that Vista is crap - common issue with being unable to create shortcuts!
Solution:
paste the following into notepad:
[HKEY_CLASSES_ROOT\.lnk]
@="lnkfile"
[HKEY_CLASSES_ROOT\.lnk\ShellEx]
[HKEY_CLASSES_ROOT\.lnk\ShellEx\{000214EE-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.lnk\ShellEx\{000214F9-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.lnk\ShellEx\{00021500-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.lnk\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.lnk\ShellNew]
"Handler"="{ceefea1b-3e29-4ef1-b34c-fec79c4f70af}"
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,\
31,00,36,00,37,00,36,00,39,00,00,00
"ItemName"="@shell32.dll,-30397"
"MenuText"="@shell32.dll,-30318"
"NullFile"=""
[HKEY_CLASSES_ROOT\.lnk\ShellNew\Config]
"DontRename"=""
[HKEY_CLASSES_ROOT\lnkfile]
@="Shortcut"
"EditFlags"=dword:00000001
"FriendlyTypeName"="@shell32.dll,-4153"
"NeverShowExt"=""
"IsShortcut"=""
[HKEY_CLASSES_ROOT\lnkfile\CLSID]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\lnkfile\shellex]
[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers]
[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\OpenContainingFolderMenu]
@="{37ea3a21-7493-4208-a011-7f9ea79ce9f5}"
[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046}]
@=""
[HKEY_CLASSES_ROOT\lnkfile\shellex\DropHandler]
@="{00021401-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\lnkfile\shellex\IconHandler]
@="{00021401-0000-0000-C000-000000000046}"
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVrsion\Explorer\FileExts\.lnk\UserChoice]
and save as .reg (any name will do)
then double click the .reg file to sort the registry and it should be sorted (restart probably required)
My Music/My Documents Default Location
What im not doing:
having my music and documents on the same partition as any windows OS as it sucks!
What im also not doing:
Creating new shortcuts when there are already ones there
Solution:
Navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
where you can change default values for most shortcuts; My music, my documents, my pictures, favourites etc etc
Problem solved
having my music and documents on the same partition as any windows OS as it sucks!
What im also not doing:
Creating new shortcuts when there are already ones there
Solution:
Navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
where you can change default values for most shortcuts; My music, my documents, my pictures, favourites etc etc
Problem solved
Thursday, 22 January 2009
vista sidebar problem
problem: vista sidebar doesnt start, stating 'administrator' is in control of app (or some such shizzle...)
what im not doing: liking working on vista one wee bit!
a side issue arose troubleshooting network issues on a vista home premium edition sony vaio flatscreen effort... very nice to look at, not much in the way of usability, sadly...
the problem was this reg key;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar
the value TurnOffSidebar shouldnt be there. you may find it in;
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar
too! why does this appear? who knows! some extra dll info here;
http://thevistaforums.com/index.php?showtopic=13550
what im not doing: liking working on vista one wee bit!
a side issue arose troubleshooting network issues on a vista home premium edition sony vaio flatscreen effort... very nice to look at, not much in the way of usability, sadly...
the problem was this reg key;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar
the value TurnOffSidebar shouldnt be there. you may find it in;
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar
too! why does this appear? who knows! some extra dll info here;
http://thevistaforums.com/index.php?showtopic=13550
Thursday, 4 December 2008
mysql database copy
problem: its always good to have a dev version of any working database for learning purposes...
what im not doing: going all 'gui'... the command line rox and it all starts there
this is surprisingly difficult with my set-up. xampplite setup on a xppro box (its my work setup, dont judge me)! in the end i had to do the following;
create database test;
then export my production database to file via phpMyAdmin, .sql
then i seemed to hit a brick wall. found posts that advised adding 'use test;' at the top of the file then issuing the following command;
mysql < c:/backup.sql;
wouldnt work. tried;
mysql -u root -p ***** < c:/backup.sql;
no good :(
but then, almost as a last gasp;
use test;
source c:/backup.sql;
job done! always remember '\' escapes in mysql so windows absolute paths are initially annoying!
Friday, 21 November 2008
flac to mp3
problem: downloaded 'king of leon - because of the times', and all in flac format
what im not doing: just leaving it, got a cheapo mp3 player that doesnt support flac (i know flac is lossless and so much better, but needs must). im also installing nothing with a gui, not needed!
installed on ubuntu, flac & lame
sudo apt-get install lame flac
get into the terminal and navigate to dir with files for convertion. a wee for loop should sort it out
for i in *.flac; do $(flac -dc "$i" | lame -h "$i.mp3"); done;
point - could have stuck in a bit of magic to chop off .flac from resulting mp3 (something.flac.mp3) but no curly braces on wee boys keyboard!
outlook express opening s-l-o-w-l-y
problem: outlook express taking 14 fortnights to open
what im not doing: just installing 'live mail' (although it is slightly better...)
seems that a dodgy autopatcher run has resulted in the above behaviour, but fairly straightforward to repair. logs show dcom error for
FB7199AB-79BF-11d2-8D94-0000F875C541
so a wee search in the registry takes me to
HKEY_CLASSES_ROOT\CLSID\{FB7199AB-79BF-11d2-8D94-0000F875C541}
InProcServer32
LocalServer32
default value seems to be path to messenger. remove this to blank entry and we are back to normal!
Subscribe to:
Posts (Atom)