Pages

Thursday, February 8, 2018

Run script at logon in any Linux with LXDE

Today I want to save you a lot of time with this shit. It's so simple when someone tells you.

- First, this works for running things at user logon, not at system startup. For the latter, use something like Cron and good luck with it.
- Second, this is user dependent. You'll have to do it for every user.
- Third, just in case you didn't read the damn title, this is for linux distributions with LXDE desktop only.

I start from the point where you have an script.sh ready and working, that being said, let's start:

1. Go to "YOUR_USERNAME/.config/autostart". These are hidden folders, so copy & paste the path into PCManFM or activate "Show hidden folders" to get to the place.

2. Create a new file called "YOUR_SCRIPT_NAME.desktop".

3. Put inside the following:
[Desktop Entry]
Name=YOUR_SCRIPT_NAME
Exec=PATH_TO_YOUR_SCRIPT
Terminal=false
Type=Application

Example for the lazy:

[Desktop Entry]
Name=FBI_hack
Exec=/james/my_folder/FBI_hack.sh
Terminal=false
Type=Application

4. Go to the start menu Preferences -> Desktop Session Settings. Check your script is listed and mark with a tick.

5. Last but not least, go to your script and make sure it has execution rights. For that, right click, Properties, Permissions tab, Execute -> Anyone.

That's all for today, with this it should run a few moments after the user logs in.
Tell me if it helped you.

Friday, January 26, 2018

My opinion about Armin van Buuren

I love Armin van Buuren and A State of Trance.



What I like:
- He's a trance icon
- He transmit energy and hapiness
- He works hard spreading the trance culture
- He hosts a radio show that is very very good.
- He's a high quality DJ and live performances are amazing.
- He has a lot of experience in the field.
- As a producer, he knows how to make very well made music. I mean, technically top level.

What I don't like:
- As a producer, which is a maybe 50% or less of what he works on now, despite the technically high class well made music, most tracks have nothing special, which is a pity. From my experience producing, I guess you need to release something from time to time, and maybe he's not in his best moment regarding inspiration.

Tuesday, January 23, 2018

Search across loads of text based files with massiveSearch.py

Today I want to share this python script that is being very very useful for me. massiveSearch allows you to search a particular string across many text based files like .txt, .cpp... I found it extremely useful when looking for strings in thousands of source code files.

Using the script is very simple. At the top there's a list of extensions of files that the script takes. You can add more text based file extensions if necessary.

First you enter a path, then a string to search and that's all. If there are matches, you'll get a path to each of the files and the lines where the matches are.

Download the script here:
https://drive.google.com/file/d/1JrymKtoEit6eekECaj3nY0vMED4TAbsz/view?usp=sharing

Hope it helps.

Wednesday, January 3, 2018

Detect and log when the internet is down with netDown.py

This a little python script that I wrote to help me troubleshoot my internet connection.



netDown.py checks periodically if the connection is OK, and if it isn't, it logs it to ta text file with the date and time when the fail was detected. Here's and example of the output:


At the top, there are 3 parameters that you can modify to change the way the script works to suit your needs.

Download:
https://drive.google.com/open?id=1EHlOJRfF4XDSwSjTW2bk_k9OO8_dZNHm

Sunday, December 31, 2017

How Ford tries to deny repairs under warranty [GUIDE]

This is the guide given to Ford workshops to try to deny repairs under warranty. It's basically a procedure for detecting aftermarket modifications to the vehicle. Bastards...


https://drive.google.com/open?id=105z6bmQRQaZhx3bNTbHKlw8kpKM4emGw

This guide was stolen from www.focusrs.org

Sunday, October 15, 2017

Add folder to Aerodrums playlist with AeroTools

Aerodrums is some fine piece of software, although not cheap (because when you buy the product, you're obviously paying for the software). However it isn't the most feature rich.

Aerodrums playlist 'manager'

One thing that pisses me off is the built in player. It's so basic you can't even add folders to the playlist, instead you must add song by song, what a beginner fail!

For me that I love to jam to lots of songs, this sucks so bad, so I developed this tool.

AeroTool
AeroTool window


This is a little program (no installation necessary) that lets you add the contents of a folder to the Aerodrums playlist.

This is provided AS IS, probably no update will be made, although you can yell in the comments and I may listen.

DOWNLOAD
https://mega.nz/#!MCAiDJQS!2p0eFfaqFvGB8ZERZ5qKNEBHzEOi9k50-YGqKbe97bk
PASSWORD: englishdrummer

The operation is so easy, even a Dacia driver can use it. Anyway I'll give some instructions for completeness.

Instructions 

1. Browse the folder where you installed Aerodrums. Usually the default will do and you'll get 'Playlist file found' in the status bar at the bottom.
2. Browse the folder you want to add.
3. Press 'Clear Playlist' to empty you playlist or 'Add folder to Playlist' to do what the button name suggests.

Modify the playlist only when Aerodrums is closed. If you are drumming and want to change it, close the program, modify and open it again, it takes seconds.

Tell me in the comments if this helped you.

Monday, October 2, 2017

Setting up wxWidgets & wxFormBuilder for Visual Studio FOR IDIOTS, NO B$

If you're here I assume you know what wxWidgets is, so let's not waste time.

It hasn't been particularly straight forward the procedure for setting wxWidgets up with my Visual Studio 2012, so I'll tell you how to do it from the ground up until having a gui running, that you'll have made with wxFormBuilder, the easy way, for lazy morons.

1. Compiling the libraries
We'll compile the libraries for our particular version of VS, so we can make sure they work, and because the pre-compiled stuff that you can find in the internet (wxPack) is a heavy pile of  shit with unnecessary gigabytes.

- First download the Windows Installer from the wxWidgets official site http://wxwidgets.org/downloads/ Install it.
- Download and install wxFormBuilder too.
- Go to C:\Program Files (x86)\wxWidgets-3.0.3\build\msw. Obviously, the path may vary if you changed the installation folder.
- Open the right Solution file, don't get fooled with the names:


vc10 means VS2010
vc11 means VS2012
vc12 means VS2013

- Build the project in Debug mode and after completed, in Release mode.
- Done.

2. Check if you fucked something up
- Go to C:\Program Files (x86)\wxWidgets-3.0.3\samples and open the solution file called 'samples'. Let VS upgrade the project if it's made with an old version of VS.
- Right click the project 'minimal' and Debug > Start new instance.
- If it compiles OK and you can see the program window, you did fine.

3. Creating a test GUI
- Open wxFormBuilder and create a test GUI. I'm not detailing this, you need to add a new form, a layout and then it allows you to insert something like a button. 
- Save the project somewhere and generate the code by pressing the gear icon.

This is the tricky part, the following lines are damn golden.

4. Getting wxWidgets to compile in your program
- Create a new project of type 'Win32 Project'. In the second page of the wizard, under 'Additional options', check 'Empty project' and uncheck 'Security Development Lifecycle (SDL) checks'.
- Once created, open the project properties.
- In parallel, open the 'minimal' sample like in point 2, and open its properties.
- Go through the sections and copy each and every damn option that is in bold to your project properties, so both project configurations match. Obviously, options like 'Output directory' aren't meant to be changed.
- Your project should compile now when using wxWidgets in your code.

5. Using a wxFormBuilder GUI in your program
- Move the files generated by wxFormBuilder to a suitable place like your project folder.
- Add the header and the .cpp to your project.
- Use the following example code in your main.cpp (for example) to launch your GUI.

#include <wx/wx.h>
#include "gui\gui.h"


class MyApp: public wxApp {

public:

virtual bool OnInit();
virtual int OnExit() { return 0; }

};

IMPLEMENT_APP (MyApp);

 bool MyApp::OnInit() {

wxFrame* mainFrame = new MyFrame1(NULL);
mainFrame->Show(true);
SetTopWindow(mainFrame);

return true;
}

NOTE 'MyFrame1' is the default frame name if you didn't change it in wxFB.

- Now if you press play, your beloved GUI should appear.

Tell me in the comments if it worked for you.