Linx Trix

July 28, 2008

Ok, THIS IS HILARIOUS!

Filed under: Uncategorized — admin @ 12:00 pm

Ok, I don’t like doing this, just posting videos… but THIS ROCKS!

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

July 27, 2008

How to Remember IP addresses More efficiently?

Filed under: Uncategorized — admin @ 12:30 pm

Okay I was developing a new website (which I won’t reveal just yet), and I needed a way to generate user logins for people who are lazy.

The thing is I know that if I want to make a good service I need to get past one thing, and that’s creating logins and passwords for people who just want to try out the service.

But, my service will have a sub domain for each new user, so just creating xhf235ssfd.mydomain.com does not make much sense, does it? Now, next thing is I will assign them unique id’s in the program, which will be determined by the data base’s auto_increment, so using a number.mydomain.com makes much more sense, but numbers are not so easy to remember, plus it looks much more ugly then having something with text. And imagine that it could be pronounceable?

Then it striked me, I recall a program which generated OTP passwords by converting numbers to mnemonics so it can be transmitted between 2 humans over a phone line just like a service to give one-time testing access. I searched and searched on my drive, but having 68Gigs of data in my home directory makes it… well a little difficult. So I went on the ‘net and found this crazy page called IP Mnemonics (here a blogpost).

It’s a cool concept, basically a ip which is 87.230.21.3 would be get.tin.bet.add which also has only 4 syllables! Pretty awesome, and I found a list which I can use to convert my sequential numbers to something nicer then just random garbage, hex-codes or a integer.

I will copy the list of numbers->names here in case the original site ever disappears.

000     zip
001     ace
002     act
003     add
004     age
005     aim
006     air
007     and
008     ant
009     ape
010     arm
011     art
012     ash
013     ask
014     bad
015     bag
016     ban
017     bar
018     bat
019     bay
020     bed
021     bet
022     bid
023     big
024     bin
025     bit
026     bog
027     boo
028     box
029     bud
030     bug
031     bun
032     bus
033     cab
034     can
035     cap
036     car
037     cat
038     cop
039     cot
040     cow
041     cry
042     cub
043     cup
044     cut
045     day
046     den
047     did
048     die
049     dig
050     dim
051     dip
052     dog
053     dry
054     dub
055     dud
056     dug
057     ear
058     eat
059     eel
060     egg
061     elf
062     elk
063     elm
064     end
065     fan
066     far
067     fat
068     fed
069     few
070     fib
071     fig
072     fin
073     fit
074     fix
075     fly
076     fog
077     foo
078     fox
079     fry
080     fun
081     gab
082     gag
083     gap
084     gas
085     gel
086     gem
087     get
088     gin
089     got
090     gum
091     gut
092     had
093     has
094     hat
095     hen
096     hex
097     hid
098     hip
099     hit
100     hog
101     hop
102     hot
103     how
104     hub
105     hug
106     hum
107     hut
108     ice
109     ill
110     imp
111     ink
112     irk
113     jab
114     jam
115     jar
116     jaw
117     jet
118     jig
119     job
120     jog
121     jot
122     joy
123     key
124     kid
125     kin
126     kit
127     lab
128     lag
129     lap
130     law
131     lax
132     lay
133     leg
134     let
135     lid
136     lip
137     lit
138     lot
139     low
140     mad
141     map
142     mat
143     men
144     met
145     mix
146     mob
147     moo
148     mop
149     mud
150     mug
151     nab
152     nag
153     nap
154     net
155     new
156     nil
157     nip
158     nod
159     nor
160     now
161     nut
162     oak
163     oat
164     odd
165     off
166     old
167     orb
168     out
169     owl
170     own
171     pad
172     pal
173     pan
174     pay
175     pen
176     pet
177     pie
178     pig
179     pin
180     pit
181     ply
182     pod
183     pop
184     pot
185     pox
186     pry
187     pun
188     pup
189     put
190     rag
191     ran
192     rat
193     raw
194     red
195     rid
196     rig
197     rip
198     rot
199     row
200     rub
201     rug
202     run
203     rut
204     rye
205     sad
206     sag
207     sap
208     sat
209     saw
210     say
211     set
212     shy
213     sip
214     sit
215     ski
216     sky
217     sly
218     sob
219     soy
220     spa
221     spy
222     tab
223     tag
224     tan
225     tap
226     tar
227     tax
228     the
229     tie
230     tin
231     tip
232     top
233     toy
234     try
235     tub
236     tug
237     use
238     van
239     vat
240     vex
241     vow
242     wag
243     war
244     was
245     wax
246     web
247     wet
248     who
249     wig
250     win
251     wit
252     yes
253     yet
254     zoo
255     all
Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

January 15, 2008

Views

Filed under: Uncategorized — admin @ 6:55 pm

It’s funny that things like this:

Have a low View count. Even if someone things these guys are wackos, I guess they are better then these guys:

But the thing is, the first has 91 views at the time of this writing, and was added Jan 7, the other has 53,xxx and was added Jan 3, and I hardly believe the few days have such an impact… rather the topic…

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

January 13, 2008

RegisterHotkeys(accelerators) with wxWidgets on linux

Filed under: Uncategorized — admin @ 10:12 am

wxWidgets has no way of grabbing hotkeys in Linux. I mean off focus hotkeys or key presses, only when your app has focus you can grab all the keys. So let’s say you are building a tray app, and want to grab a hotkey like Ctrl+Alt+B and do some action like popping up your input window or whatever, there is no way of doing it unless you want to play with XGrabKeyboard or XGrabKey, that’s all fine on some WM’s, but mostly you will have lots of grief doing it (I tried but failed to make it working on all possible combinations(Kde, Gnome, Beryl,…).

I have a solution which is not so good in terms of security, but maybe it’s acceptable to some people, so here it goes:

Just grab your inputs from /dev/input/event* and process them for yourself. Yes you will have to have root permissions, or suidroot, or whatever you prefer to access that, but it is a way around in which you will not have to worry about other subsystems since you are grabbing your keyboard directly from the source. So for some people this might be a solution.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

November 19, 2007

Mov to Avi or mov2avi for your mp4 player

Filed under: Uncategorized, easy — admin @ 6:59 pm

So you got yourself one of these chinese wholesale mp4 players? And they accept only avi files where you may have a mov file which needs to be converted to avi? And you happen to be on Linux? Just hit this and it should solve your problem:

mencoder -oac mp3lame -ovc lavc -vf scale=0:0:0:0:0:0:qpal somemovfile.mov -o outavifile.avi

For this mov2avi trick of course you have to have mencoder installed which will do the conversion for your sweet new mp4 player. BTW, the scale command is to get 352×288, but you can omit it.
This is not something much on topic, but a simple google search on the mov 2 avi won’t help you much so I thought to be nice and put this information out for any of you guys looking for it.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

August 23, 2007

Hello world!

Filed under: Uncategorized — admin @ 2:38 pm

Hello and Welcome to Linx Trix.

My goal is to write about web development / general programming stuff that I could not find while developing(or the data which I found was lacking). Which happens to me all the time since I usually do pretty weird stuff.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

Powered by WordPress