Skip to content

Instantly share code, notes, and snippets.

View sourcerebels's full-sized avatar

Edu Rodríguez Castillo sourcerebels

View GitHub Profile
@sourcerebels
sourcerebels / download-phrack-issues.sh
Created February 20, 2012 20:14
Download all Phrack Magazine Issues
#!/bin/sh
for i in {1..67}
do
FILE="phrack${i}.tar.gz"
wget http://phrack.org/archives/tgz/${FILE}
tar xvzf ${FILE}
rm ${FILE}
done
@sourcerebels
sourcerebels / framework-core-pom.xml
Created December 18, 2010 09:55
Multi-module Maven project
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>test-multimodule</artifactId>
<groupId>com.sourcerebels</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.sourcerebels.framework</groupId>
@sourcerebels
sourcerebels / build.gradle
Created December 10, 2011 14:39
Gradle application plugin: Bypassing system properties when running an application
apply plugin: 'application'
mainClassName = 'com.sourcerebels.Launcher'
run.systemProperties = System.properties
@sourcerebels
sourcerebels / MainActivity.java
Created March 10, 2017 21:18
Android Drag & Drop Sample
package com.sourcerebels.dragdrop;
import android.content.ClipData;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.DragEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
@sourcerebels
sourcerebels / symfony2-create-bundle.sh
Created February 11, 2012 18:00
PHP > Symfony2 > Clear routes and twig templates cache
# Execute this from your Symfony2 path
php app/console cache:clear --env=prod --no-debug
@sourcerebels
sourcerebels / README.txt
Created November 29, 2011 13:19
Atajos de teclado para Midnight Commander
Atajos de teclado de Midnight Commander
- Trabajar con paneles.
Alt+t: Cambia entre los diferentes modos de visualización de los paneles.
Control+r: Refresca ambos paneles.
Control+u: Intercambia los dos panels.
Control+s: Busca un fichero en el panel activo.
Alt+Shift+?: Buscar archivos en .
@sourcerebels
sourcerebels / albert-test-extension.py
Created June 20, 2019 13:49
Albert test extension
"""Edu test extension"""
from albertv0 import *
import urllib3
import json
__iid__ = "PythonInterface/v0.1"
__prettyname__ = "MobileFinder"
__version__ = "0.1"
@sourcerebels
sourcerebels / test.java
Created April 29, 2012 16:45
Android > Testing > Robolectric > Assert some button starts activity
@Test
public void shouldStartSomeActivityWhenSomeButtonPressed() {
someButton.performClick();
assertActivityStarted(SomeActivity.class)
}
private void assertActivityStarted(Class<? extends Activity> clazz) {
ShadowActivity shadowActivity = shadowOf(activity);
Intent startedIntent = shadowActivity.getNextStartedActivity();
ShadowIntent shadowIntent = shadowOf(startedIntent);
@sourcerebels
sourcerebels / README.md
Created February 10, 2019 16:26
Remove Retropie not favorite roms

Usage

It will print on standard output an script to remove all roms that are not marked as favorite in RetroPie.

python3 generate_rm_script_for_not_favorite_retropie_roms.py <system>

b.ex:

@sourcerebels
sourcerebels / README.md
Last active December 25, 2017 18:47
Linux Software for Android and Web development