rand(Ø)

> beautiful code & photos

about <

Posts tagged: hack

Android: Remote screenshot with adb

Hi there and happy new year!

Not that it's not easy to find this information but I recently signed up on Snapchat and let's be honest, it's not easy to capture the device screen when long tapping the screen.

Fortunately, Android development kit comes with a shell that allows to control your device from your computer through adb. No teaching you anything today.

I quickly wrote a tiny script that would allow anyone who found the way to install adb to capture your device screen remotely.

Create a screenshot file in the same folder of the adb binary and paste

> Continue Reading

CSS: Quick tip to test your design responsiveness

Meanwhile I'm finishing my photography portfolio, I was wondering how could I test my design responsiveness as my screen resolution is 1440x900 max so I figured out a work around...

For low resolutions, it's quite easy because you only have to resize your browser window or use Web Developer extension which provides some predefined common window sizes.
But what about 1600x1200 resolution when your laptop screen is 1440x900 (for my example)?

You could either use tool like Responsive Design Testing by Matt Kersley OR, you could use your native browser functionality if your design is well done. I mean if

> Continue Reading

PHP: Wordpress Popular Posts for the current category

Hi folks!
For my work, I luckily had to hack a client Wordpress instance... I'm glad to reached 6 years of studies after my A-Level to finally be a Wordpress hacker.

Anyway, today, my client Wordpress uses the popular plugin Wordpress Popular Posts to display various popular posts on his website. The plugin allows to exclude certain categories if you want but doesn't allow to filter for only one specific category. I read in the plugin forum that the plugin developer has this feature in his to-do list...

If you need this feature by the current version (2.2.1)

> Continue Reading

ZSH: Open a new window using the last pwd

A friend of mine used ZSH on his Mac and since I know him and his .zshrc, I keep ZSH as main CLI on my laptop, it works so well, I advice you to switch if still not :P .

But, I was very tired of typing a long cd command every time I wanted to open a new Terminal tab to execute a command in the same directory or close to where I was working ; so I looked for a hack to get rid of this pain over the Internet and now, I'd like to share it with you.

The

> Continue Reading

JavaScript: Décoder les fichiers encodés avec "dF()"

Dans la suite de mon article sur le décryptage des fichiers PHP, je ré-itère mon intervention pour décoder des scripts jQuery pauvrement protégés avec un vieux script d'encodage qui consiste à remplacer les caractère par leur code ASCII.

Si il vous plait, arrêtez de vouloir protéger vos scripts JavaScript car il y aura toujours un moyen de les décoder/décrypter... Vous allez voir comme c'est pathétique et je cite la librairie jQuery Lightbox Evolution avec sa page de démo !
Librairie vendu $14 alors qu'avec un peu de malice on peut l'avoir avec en plus une augmentation de son estime...

Procédure

> Continue Reading

PHP: Inner class

Oui oui, c'est largement possible mais c'est pas ce qu'il y a de plus beau. Préférez utiliser le pattern Factory qui lui sera beaucoup plus propre et testable que des inner classes.
Mais parfois, créer une inner class peut rendre service justement pour tester une methode typée sans forcément passer par des frameworks de test.

Dans cet article, je vais vous montrer comment on peut facilement créer une inner class en utilisant la structure de langage eval(). Certes je ne suis pas fan de cette structure de langage et l'utilise jamais car elle est source de pas mal de fails

> Continue Reading