Skip to content

Instantly share code, notes, and snippets.


Javier Godoy Núñez rotvulpix

View GitHub Profile
rotvulpix / fbVideoDownloader.js
Last active Aug 29, 2015
Facebook Video Downloader (JS Console)
View fbVideoDownloader.js
* Facebook Video Downloader, Tested in Chrome / Safari
* rotvulpix - July11/2015@0918 CLST
* Usage: Go to video page (not modal window), and execute this code in console.
* If you want the HD Source, please see it on HD first.
View Preferences.sublime-settings
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"file_exclude_patterns": [],
"folder_exclude_patterns": [],
"font_face": "Ubuntu mono",
"font_options": ["gray_antialias"],
"font_size": 10,
rotvulpix /
Created May 7, 2014
Create ISO from Folder in OS X
hdiutil makehybrid -o ~/Desktop/image.iso ~/path/to/folder/to/be/converted -iso -joliet
rotvulpix / selectTablesForDrop.sql
Created May 12, 2014
Select Tables for drop in MySQL
View selectTablesForDrop.sql
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';')
FROM information_schema.tables
WHERE table_schema = 'MyDatabaseName';
rotvulpix / RutAuthenticator.php
Created Jul 14, 2014
Login con RUT en Symfony2
View RutAuthenticator.php
namespace rotVulpix\TestBundle\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
rotvulpix / AjaxError.html.php
Last active Aug 29, 2015
Symfony2 Form Errors as JSON
View AjaxError.html.php
// Errores desde Form
$errores = $view['form']->errors($form);
// Limpieza
$limpiezaUL = str_replace('<ul>','', $errores);
$limpiezaUL = trim(str_replace('</ul>','', $limpiezaUL));
// Separar Errores
echo '===> install in OSX Mavericks'
mkdir -p ~/tmp/apc-deps
# Compile PCRE - Perl Compatible Regular Expressions
cd ~/tmp/apc-deps
curl -O
tar -xvzf pcre-8.33.tar.gz
rotvulpix / checkboxAsDropdown
Last active Aug 29, 2015
Representing Checkboxes with Bootstrap Dropdowns
View checkboxAsDropdown
<!-- RadioButtons, about them the Dropdown will be filled -->
<input type="radio" name="ambito" class="selectable" value="1" data-caption="Ámbito 1">
<input type="radio" name="ambito" class="selectable" value="2" data-caption="Ámbito 2">
<input type="radio" name="ambito" class="selectable" value="3" data-caption="Ámbito 3">
<!-- Bootstrap Dropdown - empty -->
<div class="btn-group radio-selectable" data-radio="ambito">
<button type="button" class="btn btn-default dropdown-toggle btn-info" data-toggle="dropdown">
Seleccione <span class="caret"></span>
rotvulpix / clear2.php
Created Oct 13, 2014
Deploying Symfony2
View clear2.php
shell_exec('rm -rf ../app/cache/*');
shell_exec('chmod -R 777 ../app/cache/*');
shell_exec('rm -rf ../app/logs/*');
shell_exec('chmod -R 777 ../app/logs/*');
rotvulpix / BaseController.php
Created Nov 21, 2014
Laravel Base Controller w/Hacks
View BaseController.php
class BaseController extends Controller {
* Setup the layout used by the controller.
* @return void
protected function setupLayout()