Archive for the ‘English’ Category

2012w10

Sunday, March 11th, 2012

Another week, another post :)

I had great fun at work this week. Loooong hours was looooooooooong, but at least I learnt a lot, and that I now have started playing with Wireshark.

Oh, and I got to code some small amounts of Python as well :D

Although most of the saturday was spent sleeping I did manage to discover some links I think I will just have to check out further:

  • Wemux, like tmux, but for multiple persons at once, I foresee this to be useful for either collaboration, such as remote pair-programming, or for lecture-style sessions
  • md2man, create man-pages using markdown and this conversion tool
  • Where Is Safe to Register a Domain Name? I’ll surely be thinking long and hard about this the next time I decide I need another domain

That’s about it for this week, hopefully next week will see normal amounts of work/hours and more free time to play with all the new ideas I got this week.

:wq

2012w08

Sunday, February 26th, 2012

Hacks

A capture the flag game where the objective is to break into a computer system.

Commandline

I found myself needing to remove a couple (three) columns from a file containing about 15 columnts per line. And sure, I could have done something like awk '{ print $1 " " $2 " " $3 " " }' for the 12 columns I wanted, but that would have been tedious.

There just had to be a better way. And of course there was ;)

* * * * * *

I’ve been entertaining an idea which would need version controlled updates, and they’d also need to be trusted. So I’d need signed commits, and since I’m mostly using git nowadays, I needed to find out if this was possible. It is.

* * * * * *

Since starting my new job I’ve realized just how important it can be to write portable scripts (especially echo has bitten me in the ass a couple of times already) so this post was pretty useful to me.

Society

Now this was a pretty inspiring post.

* * * * * *

A pretty funny post about how truly sorry a state the TV is in.

2012w07

Sunday, February 19th, 2012

What I thought I’d do was I’d try some more tweaks, this one about categorization. Mostly because I think some of the neat things I’ve stumbled over in the past couple of weeks might not deserve their own heading. So I am revamping the headings:

Hacks

I thought this section would be about… not necessarily hacks, but if you would, the hacker mentality. Redefining a problem, is one such trait.

And building an eco-friendly house for around $5000 is defintively another.

Finally, Hacking Hacker News, which sounds like a rather fun project.

Tech

I’ve been meaning to learn wireshark, mostly because I could probably put it to pretty good use at work, and then I found pcap2msc which could probably be pretty useful for visualizing the collected data.

I also found a pretty useful site, Sleepyti.me which, given an average sleep cycle of 90 minutes, and user input when she wishes to wake up, calculates when the user should go to bed. Neat!

Commandline

I came across a very good explanation on how to use join.

I’ve also looked into how to increase trust in commits in git, namely by signing commits with your gpg key, and it turned out to be downright easy to accomplish.

Society

I guess that if we are completely ok with any potential ramifications of businesses keeping track of everything we buy, and speculating about what our purchases indicate, then it is completely ok to dispose of cash altogether. Personally it scares the willies out of me.

It’s funny how people seem to always confirm my concerns by abusing powers they shouldn’t have had in the first place…

I knew there was a I keep calling these guys the MAFIAA. Asshats…

While I understand this point and certainly agree to a certain degree, I maintain that if more people voted with their wallets, they’d soon run out of funds with which to buy new laws.

:wq

i<3fs

Tuesday, February 14th, 2012

Patrik <3 FS == true

I don’t suppose this comes as a great surprise to anyone who’ve spent more than 20 minutes with me, and while I do believe that I am pretty good at spreading the love to the various new projects I find and make good use of, I know I can also be pretty harsh about dropping programs which no longer suits my needs (be it because my needs changed, or some feature I didn’t like got into the latest version).

This doesn’t mean I don’t appreciate the efforts of all those who contributed to the software in the first place. Without it my life would not have been as simple as these programs have made it.

So while I’ve dumped nano for gedit, and gedit for kate, and kate for emacs, and emacs for gVim, and gVim for vim, I am still fond of all those projects. Without them I wouldn’t be where I am today.

So thank you all, everyone who has contributed with your time, or money, or ideas and all the other stuff I can’t think of right now. Know that you have positively impacted at least one persons life, and for that I am truly greatful.

So thank you. All of you.

I love you guys and gals

2012w06

Sunday, February 12th, 2012

Update: Ooops, I guess we gone incremented the year again… and no one thought to tell me :(

ACTA

It’s comforting to know that the people we elect to rule us at least know what they’re doing… Oh… wait…

git and branches

Last week, for the first time, I think I groked branches. The headline mentions git branches, and if they are different from other VCS’ branches, then last week I think I groked git branches :P

I’ve known about branching for quite a while, but never gotten past anything other than a rudimentary understanding.

I think I understood how mercurial does it (simply clone the repository, name the root directory of that clone to whatever you want to call that branch, and presto. (And yes, I am aware that mercurial has a branch command as well, so my understanding on that point is probably incorrect).

Either way, what finally gave me an “aha”-moment was this blogpost.

And while one the subject: Other uses of git. I am going to take a closer look at especially Prophet.

Links

AUTOMATE ALL THE THINGS

No but seriously, frakking do it. Automation ftw.

2012w05

Sunday, February 5th, 2012

Update: Ooops, I guess we gone incremented the year again… and no one thought to tell me :(

TPP (yet another ACTA-type thingy)

Here we go again…. But it seems there is at least one intelligent/regretful person to have realized the error of her ways from last time.

I am fearful however that we are going to have to suffer more shit like this until we eradicate the “entertainment industry” (peacefully of course, vote with your wallets people!)

Because really, would you want this to be the future?

I am not in any way, shape or form serious about the following suggestion: We could of course present the internets the way the “entertainment industry” wants it, to them at least, already today. But I do love this type of humor :)

And with all these new moronic laws running rampant and frakking up the internets, this begs the question: What happens to your files when a cloud service dies? — personally I would have replaced “files” with “data” but whatever, still a worthwhile read.

Before closing the book on the subject of copyright for this time… If you’re a photographer (well, I guess, as we’ve seen with Apple/Samsung, this applies if you are a hardware designer as well): don’t take photographs which are too similar to other photographs

Educational Games

This game was both fun and, at least to me, innovative. Just a wee bit too slow for my netbook, but a real treat if it could inspire someone to start programming :)

SEC — Simple Event Correlator

I don’t really remember what I was looking for when I find this, but I was almost immediately intrigued. Now, I had to read through that first paragraph on their web page a couple of times, and then still read the two excellent tutorials before I figured out what I could use it for, and I think I can express that shorter: look at logfiles, if X happens, execute command Y.

It is a little more complex than that, like if X happens, but A doesn’t happen within a specified time window following X etc.

freedom.txt

This is an interesting initiative which seems to have it roots here and is now maintained on github.

I think the wording of the text regarding governments is a bit inflammatory and could probably be misconstrued, deliberately or otherwise, and turned into a weapon against the initiative itself.

Personally I’d have preferred either to have the wording changed, seeking instead to inspire and educate (yes I know, presumptuous of me to believe I hold the truth) our fellow citizens, or at the very least change the wording into something less misinterpretable.

We should hold those we have elected to govern us at higher standards, instead of not reacting at all, letting them off the hook as it were, whenever they err on the side of dishonesty and/or corruption.

I don’t feel I can really put my signature on that text as it currently stands, but I think I’ll remix it to something I can stand for.

If nothing else, the most interesting idea I got out of it, was the addition of “points of interests” links and IP addresses (see the github page for that). There are some services on there which further makes me unable to put my name on that document, but hoarding IP addresses, and mapping them to domain names, is interesting…

More on this later, when I have thought some more about it.

Links

2012w04

Sunday, January 29th, 2012

Update: Ooops, I guess we gone incremented the year again…

Links

In a nutshell, this is exactly why I stay as far away from Apple as I possible can.

This whole cloud business and software as a service sure works well, doesn’t it?

2012w3

Sunday, January 22nd, 2012

mitmproxy

Granted, there shouldn’t be all that many use cases for a software such as this for a non-pentesting, non-criminal, but the fact that it can record and replay previous interactions, which can be useful, for instance, to automate login on access protected networks (hopefully ones that we already have permission to enter, but find the actual logging in part a real hassle).

Procedural City, Part 1

I thoroughly enjoyed reading this entire series of blog posts, in which the author had the “simple” goal of generating an entire city, digitally, in a procedural manner.

Fedora Friendfinder

Ok, so this is just humor, but you know what? It is good humor :)

XXXTerm

This sounds like something kinky, but is in reality a minimalist web browser with sophisticated security features designed-in.

So, a bit like luakit but with a funnier name ;)

Pipeviewer

pipeviewer really is something I could have more use for, if I just ever remebered to use it ;)

The next SOPA

You know what? This guy is on the right track. And I think Joel is as well.

MPAA shows us just why they are not a part of the solution. Mostly it is because they, and the rest of the abusive copyright-holders are their own worst enemy. Of course, they won’t go down peacefully, so it really is time for us to start fighting back. And there are plenty of targets to chose from.

In related news, it seems the Polish internet community is “unhappy” with ACTA… very nice :)

2012w02

Sunday, January 15th, 2012

Update: Corrected link, thanks Ulf

This has been quite the busy week. Oodles and oodles of stuff happening, both nice and… less nice.

UEFI + SecureBoot

Microsoft up to no good again. Basically, on non-ARM systems Microsoft requires that a user can disable SecureBoot, but not on ARM systems (i.e. smartphones, tablets, and the upcoming ultrabooks). Anyone surprised?

Music Production

While I have no real interest in producing music myself—code and, to some extent, graphics have always come easier to me—I do have an interest in seeing tools like this come to GNU+Linux as well, since it means that’s one less category of creators not having the alternative to be creative in a free software environment :)

sshuttle

This project seems pretty cool, I haven’t tried it out yet, and the thing about uploading code to the server is something I’ll definitively look into before actually considering executing it, but all in all this looks like a pretty easy SSH tunneling/VPN mimicing proxy thingy solution which could be useful at times.

Especially if it means I can sit at an internet café or some such, and have all my traffic routed över SSH through my server at home, not having to worry about someone in that café sniffing it up.

tmux

I installed a local copy of tmux at work, and so far it has been a complement rather than a detriment to the way I work.

The one thing that I wasn’t pleased with at first, but which was trivially easy to fix, once I read a blogpost (also, don’t miss the second post), was that I wanted 11 shells all stacked on top / below eachother, with an even size (i.e. each should take up 1/11th of the tmux window height.

When splitting the window, to make room for another shell, it just divides the current shell height by two, and makes the one part the new shell, and the other part the old shell. For multiples of two I suppose this would work out fine, but with 11 shells?

So I went about it, and the tenth and eleventh shell were small.
But there are different preconfigured layouts, and you loop through them by repeatedly hitting the control sequence (I’ve mapped this to C^a) and space. One of those layouts proved to be just what I wanted :)

Raspberry Pi

Now this is a pretty cool project! For the condensed summary, read the wikipedia page. It is making the dream of a $100 computer a reality, and there are some pretty cool ideas already about how to put it to good use.

SOPA

Reddit doesn’t like SOPA, and Tim O’Reilly isn’t all that pleased either.

If you’re an Android user, and you don’t like SOPA either, there is an app for letting you know (by scanning barcodes) if a product is made by a pro-SOPA company so you can avoid supporting them.

There have been some advances which means that making a fuzz about it can pay off. Of course, it would be better to scrap those bills completely.

So, 2012-01-18 is still SOPA Blackout day and a whole lot of sites are participating, and you could join in as well (and if you want to join in, please be smart about it and host the javascript your own damn self so that the hosting server doesn’t go down… (which also means, get that javascript now, and not on tuesday evening when everyone else is going to try to get it))

Links

  • Privacy in social networks — not sure I understand how it is done, not sure that this implementation is optimal, but nice idea none the less
  • I read a post the other day, and the author of that post, while being in the right, just came off … I don’t know, but his post was a rant, and not the passionate kind, but the whiney kind, so I won’t be linking to his post, I have no wish to drive traffic to him. However, another person, with reasoning and values more aligned to my own, wrote a reaction post to his, which I feel was more constructive, and nicer, so here is the link to that post
  • Unfair advantages grow from irrational habits
  • Rikard tipped me off to a thoughtful TED talk video, which I liked alot, and through the speakers website I found, among others, this game—EVOKE—which seems to be pretty cool
  • I had the idea of building an image gallery a while ago, so when I came across this link I was a little interested in seeing how they’d approached it, but what I really took away from this site, is how much I liked their rather user-friendly step-by-step manual for getting it up and running
  • I wonder what he will create? :)
  • I don’t know if it’s just me, but non-flashy, low-requirements games make me all warm and fuzzy inside
  • I seem to recall that I wasn’t all that impressed with the unhosted project some time ago. This post (specifically the verification section) is exactly why I hesitate

2012w01

Sunday, January 8th, 2012

column

The other day I wanted some prettier (tabularized) output and of course someone has already wanted this and of course there are tools for that :)

bash_completion

This is so frakking cool! I’ve built this little shellscript “vault.sh” which is a simple wrapper script for mounting and unmounting encfs mounts.

It takes two parameters: operation and target, where operation can be one of “lock” and “unlock”, and target—at present—resolves to “thunderbird” (signifying my .thunderbird directory).

Since I intend to expand this with more encrypted directories as I see fit, I don’t want to hard-code that.

What I did want, however, was to be able to auto complete operation and target. So I looked around, and found this post, and although I couldn’t derive enough knowledge from it to solve my particular problem, having multiple levels of completion, the author was gracious enough to provide references to where s/he had found the knowledge (here, here and here). That second link was what did it for me.

My /etc/bash_completion.d/vault.sh now looks like this:

_vault()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    first="lock unlock"
    second="thunderbird"

    if [[ ${cur} == * && ${COMP_CWORD} -eq 2 ]] ; then
        COMPREPLY=( $(compgen -W "${second}" -- ${cur}) )
        return 0
    fi

    if [[ ${cur} == * && ${COMP_CWORD} -eq 1 ]] ; then
        COMPREPLY=( $(compgen -W "${first}" -- ${cur}) )
        return 0
    fi
}
complete -F _vault vault.sh

And all the magic is happening in the two if-statements. Essentially: if current word (presently half typed and tabbed) is whatever, and this is the second argument to the command, respond with suggestions taken from the variable $second.

Otherwise, if current word is whatever, and this is the first parameter, take suggestions from the variable $first.

Awsum!

awk for great good

Another great use for awk: viewing selected portions of source code. For instance, in Perl, if you just want to view a specific subroutine, without getting distracted by all the other crud, you could do: $ awk '/sub SomeSubName/,/}/' somePerlModule.pm

Links

If PHP were British, perhaps it’s just me, but I find it hilarious.

PayPal just keeps working their charm…

Belarus just… wait what?

Why we need version control

Preserving space, neat!

Fuzzy string matching in Python

If you aren’t embarrassed by v1.0 you didn’t release it early enough

The makers schedule, oldie but goldie

CSS Media Queries are pretty cool

Static site generator using the shell and awk

A netstat companion

Reducing code nesting

Comparing images using perceptual hashes

Microsofts GPS “avoid ghetto” routing algorithm patent…