Tag-Archive for » bash «

Ketvirtadienis, Lapkritis 12, 2009 | Autorius:

Jei jūs kada nors rasti sau atnaujinant bendrąją paraišką Arch Linux (labai bloga idėja, BTW) ir atnaujina readline jums gali baigtis pamatyti klaidą palei linijas:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Tikimės, kad jūs vis dar turite bash greitai atidaryti, o jūs nesate uždarytas juos visus. Jei Jūs vis dar galite, nedelsiant paleisti taip:
pacman -S bash
dar jums nebus galima paleisti bash bet daugiau, nes linksmybės vis tiek būtų susieti su sena versija readline.

Taip pat, ateityje, neveikia
pacman -Sy application
(python mano atveju)
užuot, paleisti:
pacman -Syu
kuri užtikrins, kad visos paraiškos bus atnaujintos.

Asmeniškai, Manau, kad linksmybės turėjo turėti priklausomą rinkinį, sakydamas, kad jis reikalingas senas konkrečią versiją readline ir pats naujos linksmybės, reikalauti, kad nauja versija readline. Nepriklausomai, o žaisti saugu. 😉

dalis
Penktadienis, June 05th, 2009 | Autorius:

Well it turns out that the problem is a little more subtle than that. It is only the šaknis 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. 🙂

dalis
Šeštadienis, March 28th, 2009 | Autorius:

Its amazing how much you can do by combining the small yet powerful commands Unix has available.

This little-used command, time, finally became useful today as a way to report the length of time that certain automated operations are running. In my example, I’m timing how long it takes to build the Linux kernel:

$ time rebuild-kernel26
...
couple-thousand-lines-of-scrolling-text
...
==> Finished making: kernel26 2.6.28.8-1 x86-64 (Sat Mar 28 17:19:52 SAST 2009)
real    62m21.994s
user    43m31.846s
sys     6m1.096s

Yup, that took a little over an hour to build. The values are:

  • realthe actual time elapsed while the command was running – 62 minučių
  • “vartotojas” the amount of userland time the command used – 43 minučių
  • systhe amount of system time the command used – 6 minučių

(I was busy doing other things while this was happening which is why it took 62 minutes for the desktop to do (43+6=) 49 minutes-worth of work)

If you’re using the GNU versija (most likely), it also gives you the option of displaying the results in a custom fashion. Mostly, this command could be useful in scripts where you need to report how long a task tookor maybe? just a geeky way to time something random. 😛

dalis
Kategorija: Linux  | Žymos: , , , , , , ,  | Palikite komentarą
Trečiadienis, March 18th, 2009 | Autorius:

[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, nėra csplitting required (gerai, 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
#Suktas - brendan@ųwiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -ir
 
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 -in $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

daugiau…

dalis
Šeštadienis, Vasaris 21, 2009 | Autorius:

and my Personal Rating (PR) out of 10 😉

I use "Firefox" so most of these won’t apply to non-FF users. Tačiau, 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. 🙂

Asmeniškai, 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. 🙂

vaizdo DownloadHelper – 10

Vaizdo DownloadHelper ieško srautams pritaikytos medijos – specialiai ieško bet kokio didelio turinio, kuris yra atsisiunčiama. Kai paspausite ant piktogramos, Ji rodo jums šiuo metu-parsisiuntimo srautus ir suteikia jums galimybę eilėje ją kaip “normalus” Parsisiųsti.

Kadangi jūs niekada nežinote, jei FF ketina avarijos arba maitinimo ketina sumažinti, Norėčiau, kad išsaugotumėte kopiją į mano darbastalio ir tada aš galiu peržiūrėti vaizdo įrašą, nenaudojant daugiau pralaidumo vėl atsisiųsti vaizdo. Taip pat, darbe, kai žmonės atsiųsti nuorodos į youtube ar kitų žiniasklaidos, Aš paprastai nesivargina žiūrėti iki kiek po – ne savo poilsiui ar pertraukos metu.

Expiry Canary – 9

Tai tvarkingas ir minimali Addon jums pasakys, jei SSL sertifikatas svetainėje, kuriame esate netrukus ketina baigiasi. Jei jūsų svetainė turi SSL sertifikatą, Aš rekomenduoju jums naudoti šį addon padėti išvengti svetainės SSL sertifikatą, kuris baigiasi dėl paprasto pranešimo ar nesusikalbėjimo trūksta.

Fasterfox – 8

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

padegėjas – 9

Dėl interneto svetainių kūrimas ir eksperimentuoti su puslapių. Awesome mažai bitai kodo testavimo, taip pat derinimo puslapiai.

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

Nuostabus naršyti konkrečius puslapius per konkrečių proxy serveriai. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Aš naudoju šį maršrutas šiek tiek eismo per proxy serverių, kad aš mieliau ne eiti per numatytųjų maršrutais. Its also very flexible. Jei turite daugiau nei vieną proxy serverį galima ir tą, kurią paprastai naudojate staiga eina ant akimirksniu, tiesiog perjungti į kitą. 🙂

greasemonkey – 10

Right now, I use this only for the GooglemonkeyR scenarijus. 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 yra awesome blokuoti skelbimų. Jo šiek tiek erzina ne pirmas, nes jūs turite baltąjį visas svetaines, jums patinka – but in the long run it is soooo worth it. 🙂

prikelti Puslapiai – 10

Labai naudinga jei jūs naršyti svetainėje ir tai atsitinka būti žemyn. Jei svetainė yra statinis turinį orientuotų tada tai leidžia lengvai ir greitai rasti turinį, jei jos talpyklos internete.

Skirtukas 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.

dalis