Tag-Arhiv za » tresnuti «

Thursday, November 12th, 2009 | Autor:

If you ever find yourself updating a single application in Arch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Hopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediately run the following:
pacman -S bash
else you won’t be able to run bash any more because bash would still be linking to the old version of readline.

Također, in future, don’t run
pacman -Sy application
(python in my case)
instead, run:
pacman -Syu
which will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Udio
Petak, June 05th, 2009 | Autor:

Well it turns out that the problem is a little more subtle than that. It is only the root user that does not have syntax highlighting.

You see, vim does have syntax highlighting but vi and vim are different binaries. A shell startup script only aliases vi to vim if the user id is higher than 100 – which excludes root. The simplest workaround is to just add an explicit alias to root’s .bashrc at /root/.bashrc :

alias vi='vim'

run the command manually or just log in again toactivatethe alias.

Btw, I’m starting to like via lot. For a long time it made no sense to mebut now I am found. 🙂

Udio
Subota, 28. ožujak, 2009 | Autor:

Njegova nevjerojatna koliko možete napraviti kombiniranjem mali, ali moćan naredbe UNIX ima na raspolaganju.

To malo korišten naredba, Vrijeme, napokon postala korisna i danas kao način prijavljivanja duljinu vremena koje su određene automatizirani operacije teku. U mom primjeru, Ja sam vremena koliko je vremena potrebno za izgradnju Linux kernela:

$ Vrijeme obnoviti-kernel26
...
Nekoliko tisuća-linije-of-scrolling-teksta
...
==> Dovršite: kernel26 2.6.28.8-1 x86_64 (Sub Mar 28 17:19:52 SAST 2009)
Pravi 62m21.994s
Korisnik 43m31.846s
sys 6m1.096s

Yup, da je nešto više od sat vremena za izgradnju. Vrijednosti su:

  • “Pravi” stvarno vrijeme proteklo dok naredba je trčanje – 62 minuta
  • “Korisnik” količina userland Vrijeme naredba koristi – 43 minuta
  • “sys” količina vremena sustava naredba koristi – 6 minuta

(Bio sam zauzet drugim stvarima, a to se događa zato što je uzeo 62 minuta za desktop učiniti (43+6=) 49 minuta-vrijedno rada)

Ako koristite GNU verzija (najvjerojatnije), ona također vam daje mogućnost prikazivanja rezultata u običaj modi. Uglavnom, ova naredba može biti koristan u skripti gdje morate prijaviti koliko je zadatak uzeo – ili možda? samo štreberski način na vrijeme nešto slučajnih. 😛

Udio
Kategorija: linux  | Tagovi: , , , , , , ,  | Ostavite komentar
Srijeda, March 18th, 2009 | Autor:

[edit] So much for that. It turns out that openssl is able to determine that the key and certificate are already in a single file. Therefore, nema csplitting required (dobro, I hope somebody reading this at least learned about how nice csplit is). In fact, the whole script might as well be obsoleteblaargh. Well, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#!/bin/bash
#pem2pfx
#v0.2
#Lukav - brendan@swiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; then
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
 
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -u $1
 
 else
  echo "pem2pfx - converts a .pem formatted private-key and certificate file to an IIS-compatible .pfx file."
  echo "Usage: pem2pfx inputfile.pem"
fi

više…

Udio
Subota, February 21st, 2009 | Autor:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. Međutim, I’d be very very interested to hear what other addons my friends, subscribers, and random websurfers find interesting or useful to them. Have your say and let us know why you love the addons you love. 🙂

Personally, I prefer addons that aren’t intrusive. Ideally, an addon must have a minimal interface and give me a measurable benefit for me to keep it installed.

Cacheviewer – 7

This is a GUI front-end for the Cache Firefox keeps of the last few pages and media. I’ve found this addon more interesting than useful right now so I’m probably going to remove it soon.

ColorfulTabs – 9

I love the colours. The tab colour-grouping doesn’t work very well when you reach about 30 tabs though… :-/

Download Statusbar – 10

I prefer having everything in Firefox in a single window in tabs. Having a download box in a separate window is a big no-no for me. It also saves screen real-estate since it is very minimal. 🙂

Video DownloadHelper – 10

Video DownloadHelper izgleda za streaming medije – posebno u potrazi za bilo velikog sadržaja koji se skinuti. Kada kliknete na ikonu, To pokazuje trenutno-skidanje potoci i daje vam mogućnost da ga Red kao “normalan” preuzimanje.

Budući da nikad ne znam je li FF ide na sudar ili moć će se smanjiti, Radije bih spremiti kopiju na moj desktop i ja tada mogu pogledati video bez upotrebe više bandwith ponovo preuzeti video. Također, na poslu, kada ljudi šalju mi ​​linkove na youtube ili neki drugi medij, Ja obično ne smetaju gledajući do mnogo poslije – na vlastitu slobodno vrijeme ili tijekom stanke.

Expiry Canary – 9

Ovaj uredan i minimalna addon vam kaže ako je SSL certifikat za web-lokaciju koju trenutačno gledate uskoro će isteći. Ako vaš vlastiti site ima SSL certifikat, Preporučujem vam koristiti ovaj addon kako bi se izbjegli vaše stranice SSL certifikat istječe zbog jednostavnog nedostatka obavijesti ili miscommunication.

Fasterfox – 8

Fasterfox adds some network optmisation options. Some of the options could make your corporate network admin a little mad with you though. 😉

Palikuća – 9

Za izradu web stranica i eksperimentiranja sa stranicama. Strašan za testiranje male komadiće koda, kao i za ispravljanje pogrešaka stranice.

FoxClocks – 6

errtells you the time in other time zones. o.O Was useful for a short timenow its redundant since my head is working it out faster than I can glance. rm -f

FoxyProxy – 9

Strašan za pregledavanje određene stranice kroz posebne proxy poslužitelja. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Ja koristiti ovaj na put neki promet preko proxy servera koji sam radije ne prolaze kroz zadane rute. Its also very flexible. Ako imate više od jednog proxy poslužitelja dostupna i onaj koji se obično koriste odjednom ide na tren, samo prijeći na sljedeću. 🙂

Greasemonkey – 10

Right now, I use this only for the GooglemonkeyR Skripta. This script reformats Google‘s search results to your specifications and also has an option to show small thumbnail of the pages Google links to. Greasemonkey can do a lot more and there are plenty of scripts readily available for many many sites.

Live HTTP headers – 8

I’ve used this a few times to diagnose gzip compression issues with IIS web servers. Not much else to say though: It works.

Live PageRank – 10 (so faronly installed it yesterday)

This addon seems simple enough. It gets the PageRank from Google and shows it in the tray.

NoScript – 10

NoScript je strašan u blokiranju oglasa. Njegova je malo iritantan na prvi, jer morate dopuštenje za sve web stranice koje vam se sviđaju – but in the long run it is soooo worth it. 🙂

Ponovno uvođenje stranice – 10

Vrlo korisno za ako pregledavati na stranicu i to će se dogoditi da bude dolje. Ako je stranica statičkog sadržaja orijentirane onda to olakšava brzo pronalaženje sadržaja ako svoj cached online.

Tab Mix Plus – 8

Awesome for if you have more than 7-or-so tabs.

ShowIP (using a version modified for work purposesdisplays company server’s canonical name when browsing) – 10

I cannot imagine the hell I’d have to go through to identify a server without this plugin. Okay, I can. Used to have to do this all the time. I eventually scripted it but I can’t find the original script. Here’s my 60-second attempt at recreating what was in that script:

$ cat /etc/hosts | grep `dig A $hostname @mycachingnameserver | grep . | grep -v "^;"`
$ dig -x `dig A $hostname @mycachingnameserver | grep ^$hostname | grep A | \
  awk '/[.]/{print $5}'` @mycachingnameserver | grep . | grep -v "^;"

Web Developer – 9

I used this once to diagnose some issues with a page. I don’t do much web development so I’m going to remove this one. Its no comment on its capabilities since I believe this is a top notch add-on if you’re doing a lot of web development work.

Udio