Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Javier Godoy Núñez rotvulpix

🎯
Focusing
View GitHub Profile
View sample-narnia-nginx-vhost.conf
server
{
error_log %s/logs/%s debug;
listen 80;
server_name %s;
root %s/%s;
}
@rotvulpix
rotvulpix / copera.rm
Created Sep 14, 2015
Streaming Radio Cooperativa (Nostalgia)
View copera.rm
rtsp://200.29.30.2:554/encoder/copera.rm
--stop--
pnm://200.29.30.2:7070/encoder/copera.rm
@rotvulpix
rotvulpix / config
Created Jul 26, 2015
sample-nginx-laravel-config
View config
server {
listen 80;
server_name localhost;
root /Users/rotvulpix/Source/Lab/front;
access_log /var/nginx/logs/front.dev.log main;
error_log /var/nginx/logs/front.dev.error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
View brew-mcrypt-httpd.conf.diff
--- /usr/local/etc/apache2/2.2/original/httpd.conf 2014-12-05 20:14:50.000000000 -0500
+++ /usr/local/etc/apache2/2.2/httpd.conf 2014-12-05 20:16:46.000000000 -0500
@@ -38,7 +38,7 @@
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
-Listen 8080
+Listen 8000
#
@rotvulpix
rotvulpix / BaseController.php
Created Nov 21, 2014
Laravel Base Controller w/Hacks
View BaseController.php
<?php
class BaseController extends Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
@rotvulpix
rotvulpix / clear2.php
Created Oct 13, 2014
Deploying Symfony2
View clear2.php
<?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
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>
</button>
View install.apc.sh
#!/bin/bash
echo '===> install apc.so in OSX Mavericks'
mkdir -p ~/tmp/apc-deps
# Compile PCRE - Perl Compatible Regular Expressions
cd ~/tmp/apc-deps
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.33.tar.gz
tar -xvzf pcre-8.33.tar.gz
@rotvulpix
rotvulpix / AjaxError.html.php
Last active Aug 29, 2015
Symfony2 Form Errors as JSON
View AjaxError.html.php
<?php
// Errores desde Form
$errores = $view['form']->errors($form);
// Limpieza
$limpiezaUL = str_replace('<ul>','', $errores);
$limpiezaUL = trim(str_replace('</ul>','', $limpiezaUL));
// Separar Errores
@rotvulpix
rotvulpix / caller.js
Last active Mar 23, 2018
Dynamic (AJAX) Bootstrap Modal (Bootstrap 3)
View caller.js
$("[data-toggle='modal']").click(function(e) {
/* Prevent Default*/
e.preventDefault();
/* Parameters */
var url = $(this).attr('href');
var container = "#" + $(this).attr('data-container');
/* XHR */
$.get(url).done(function(data) {