Page 14 of 30

Getting fast with rspec

get the gem from here

http://github.com/timcharper/spork

 

How to fix the Missing error

http://chrisblunt.com/blog/2009/08/28/rails-configuring-rspec-for-spork/

 

Hardening linux

Check those links if you want to be ontop of the securuty

  • CIS Benchmarks – contains requirements from the Center for Internet Security (CIS) benchmarks.
  • DCID – contains requirements from the Director of Central Intelligence Directives (DCID).
  • DISA UNIX STIG – contains modules that address DISA UNIX Security Technical Implementation Guides (STIGs) security recommendations.
  • FERC CIP – contains modules that address the Critical Infrastructure Protection (CIP) standards for electricity distributors.
  • JAFAN – the Joint Air Force-Army-Navy (JAFAN) manual established the security policy and procedures for storing, processing, and communicating classified Department of Defence (DoD) Special Access Program (SAP) information in information systems.
  • NISPOM – contains modules that address the National Industrial Security Program Operating Manual (NISPOM).
  • PCI DSS – Payment Card Industry Security Standards Council includes members from Visa, MasterCard, American Express, Discover, and JCB International Credit Card Company. This council administers the Data Security Standard (DSS).
  • Web Services Protection – contains modules that address standard security functionality to provide protection.

IBM tutorial

Bulgarian Аdministration

I don’t have time read newspapers during my work day. But the Bulgarian administration has.

Check what is doing this woman in municipal court of Sofia. She doesn’t care that I have take picture of here

Нагла, мързелива работничкаBulgarian swingeing lazy worker

Emulate3buttons

Faithful to the rule that I must blog everything that took me more than 15min searching in google I am here again.

This time the post is related to my notebook which mousepad doesnt support double tap (poor lenovo :) )

Emulate3buttons – this is the magic key. Wonder how to use it? Just click left+right at the same time.

Also be aware: in the new distros this setting is not changed from xorg.conf  check this article

http://www.seebs.net/log/articles/459/disabling-emulate3buttons-on-ubuntuleft+left+right clicks right clicks

The rest is a copy/paste from the post above

The problem is that you can’t just override this in xorg.conf anymore. You need to use xinput. xinput’s powerful, clever, flexible… and totally over the heads of a lot of users. Here’s a script to run from .xinitrc or the equivalent which disables Emulate3Buttons on any input devices which have it. (It’s now called “Middle Button Emulation”, mind.)

#!/bin/sh
xinput list | sed -ne 's/^[^ ][^V].*id=\([0-9]*\).*/\1/p' | while read id
do
        case `xinput list-props $id` in
        *"Middle Button Emulation"*)
                xinput set-int-prop $id "Middle Button Emulation" 8 0
                ;;
        esac
done

How this works: We first obtain a list of ID numbers, disregarding those where the second character on the line was V, because xinput list-props doesn’t work on the "Virtual[...] lines for the generic keyboard and mouse. For each such device, we check to see whether it has the feature; if so, we disable it. (The number 8 indicates that we’re setting an 8-bit value; it doesn’t really matter. The disabled state is 0.)

Ascii art

Self portrait

.;:;:;:;:;:;:;:;;;;;;;;;;;;----::-=-===============+=+=+++++++|+:
.;:;:;:;:;:;:;;::::---                  --=====++=+++++++++|+|=|:
.;:;:;:;:;:;::::--                          --++=++++++|+|+++|+|:
.;:;:;:;:;::::-                                 -|++|+++++|+|+|+;
.;:;:;::::::                        .  .         :+|=|+|||+||+||;
.;;;:;::::                   ....--...-..         :+|+|+|+|+|+|+;
.;;;;:::::               ......:::::::.:...        |+|+|+||+||||;
.=;;:;:::.              ......-.:.:-:::::..        -|||||+||+|+|:
.=;;;::::.             .......:::::::::::::..      :|+|+|+|+||+|:
.=;;=;::::             ..  .           - -;:::      =+|+||+|+|+|:
.===;;;:::.              .          .  ...::==:   .;::||+|+|+|++:
.=====;;:;:               :::        :..::;;==;: .: --|+|+|++++|:
:======;;:;:             .:::..... .;;:;:;;=====;.+..:=|++++|+++:
.=======;;;;             .::::;;:::::;;;=======;==+;===|++|=+=++:
:==+====;;;;.            :;:.:..:.::;=======;=;=;== --`   -=|=++:
:=+=+++======.              .. :.:.::;;;;=;====;==`       :+=+|=:
:=+++++|====;=              ..:... . ;;=====;=;:;:       ::;:;=-.
:++++|++++====:                 ..:...:=;==;;;:::.      .:;;;.: .
:++|++|+|+++===;              ..::::::-::;::::....     .::: . ..
:+|+|+|+|+|++====_.           -.::::-: --......::.    .::. . : :
:|+|+|+||+||+|+++==+_.        .     .  .   ..:::.   .:::.  ..:.
:+|+|+||+||+||+|+|====;                  .:::::   ..:. . .- - .
:||+||+||+|+|+|+++=;-               . -.:.:.: .  ::. ....:..  .
:|+||+||+|+|++==--                   .......       .-...: .  .
:||+||+|+++==--                                  ..  .. . .

hmmm… copy and paste it in some console for best results. Be ware! In this image I have encoded very destructive shell commands!

Here is a tutorial how to do use it.

ascii art video and images


In short you only need

apt-get install aview

then asciiview someimage.img

List of nice torrents

  • nanoset.net
  • demonoid
  • torrents.ru
  • zamunda.net
  • rarbg.com
  • p2pbg.com
  • data.bg
  • bitme.org

http://www.torproject.org/

ThickBox

Thickbox doesnt work with the new versions of jquery. The max version I found that it works it was 1.2.6.

List of alternatives

http://stackoverflow.com/questions/687132/a-modelbox-for-jquery-1-3-2

 

 


vote up 0 vote down star

1
I am using jQuery 1.3.2 and I was wondering if anyone knew of a modelbox/lightbox that would work with that. I’ve found a bunch of jQuery powered lightboxes, but most of them use way older versions of jQuery.

I am going to use it to display an html form so it need it to support more than just images.

Thanks

I ended up going with colorbox because it’s really pretty good. The only downside I can see is that if doesn’t recenter after you re-size the browser window, but I can live without that.

flag


57% accept rate

5 Answers

vote up 2 vote down check
ColorBox is one that I found recently and seems similar in capability to Thickbox. Their main page indicates it was built against jQuery 1.3.

The particular features that were important to me were:

  • Appearance is completely controlled through CSS so users can restyle the box.
  • Degrades gracefully, all content displayed can be accessed without JavaScript.
  • Generates W3C valid XHTML and CSS, JSLint free with no added global variables.
link|flag

vote up 3 vote down

I don’t think there’s anything specifically for 1.3.2 as it is pretty recent.

Even though Thickbox is ancient, it still works well and lets you show anything you want in the modal.

Also check out jqModal for a little newer plugin with some features Thickbox lacks like callbacks.

I’ve used both of these with >1.3 jQuery versions with no problems and they are very good.

link|flag

vote up 0 vote down

We’ve used both SimpleModal and FancyBox and had good results.

link|flag

vote up 0 vote down

Just tried SimpleModal, does not work with jQuery 1.3.2. As soon as I switch back to 1.2.6, everything back to normal. Any suggestions? Thanks

link|flag

vote up 0 vote down

Slimbox 2: http://www.digitalia.be/software/slimbox2

Works perfectly for me with jQuery 1.3.2, and is as simple as original LightBox.

link|flag

Fonts for coders

guda@guda-laptop:~$ sudo mkdir /usr/share/fonts/myfonts
guda@guda-laptop:~$ cd myfonts/
guda@guda-laptop:~/myfonts$ sudo cp *.ttf /usr/share/fonts/myfonts/
guda@guda-laptop:~/myfonts$ sudo fc-cache -f
guda@guda-laptop:~/myfonts$

Font sources:

 

Make X11 fonts available to Java

Perform one of the following:

  1. Open /etc/profile and add a new environment variableJAVA_FONTS=/usr/share/fonts/truetype
    export JAVA_FONTS
  2. Open font.properties file under jre/lib directory, uncommnent and set to the appropriate font directoryappendedfontpath=/usr/share/fonts/truetype

http://www.hongkiat.com/blog/category/inspiration/

http://www.hongkiat.com/blog/category/inspiration/

Mod Rewrite, mod_rewrite

Found great summary of mod rewrite here

http://stackoverflow.com/questions/286004/hidden-features-of-modrewrite

 

I aways forget the params for mod_rewrite so here is the summary

  • [R] force a redirect (default 301)
  • [R=302] force a 302 redirect
  • [L] stop rewriting process (see note below in common pitfalls)
  • [NC] case insensitive matches

© 2024 Gudasoft

Theme by Anders NorénUp ↑