Skip to content

Instantly share code, notes, and snippets.

View casivaagustin-zz's full-sized avatar

Casiva Agustin casivaagustin-zz

View GitHub Profile
@casivaagustin-zz
casivaagustin-zz / gist:0041fd649a1aba4d06e61999cd46fd44
Created January 14, 2019 22:35
Install VS code plugins for PHP
#!/bin/bash
extensions="alefragnani.Bookmarks
arcticicestudio.nord-visual-studio-code
bmewburn.vscode-intelephense-client
cjhowe7.laravel-blade
dbaeumer.vscode-eslint
felixfbecker.php-debug
felixfbecker.php-intellisense
felixfbecker.php-pack
alias dock-stop="docker stop `docker ps -a -q|xargs`"
alias dock-up="docker-compose up -d nginx mysql phpmyadmin redis workspace maildev"
@casivaagustin-zz
casivaagustin-zz / bash
Created August 14, 2018 13:48
Script to Install my vscode extensions all at once PHP
#!/bin/bash
extensions="alefragnani.Bookmarks
arcticicestudio.nord-visual-studio-code
bmewburn.vscode-intelephense-client
cjhowe7.laravel-blade
dbaeumer.vscode-eslint
felixfbecker.php-debug
felixfbecker.php-intellisense
felixfbecker.php-pack
@casivaagustin-zz
casivaagustin-zz / gist:6cb5c147a81e081a28113482a923b9b9
Created August 13, 2018 22:23
Composer Install - One Command all platforms
curl https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/compose
import java.io.*;
import java.util.*;
public class Main
{
private static Reader in;
private static PrintWriter out;
private static ArrayList<Edge>[] fw, bk;
public static final int INF = 100000000;
//In the settings.php add at the end.
include(dirname(__FILE__) . '/fast404.inc');
// Add a file fast404.inc in the same folder than settings.php
$fast_404_page = dirname(__FILE__) . '/themes/fast_404.html'; #//Setup this 404 page.
include_once('./sites/all/modules/contrib/fast_404/fast_404.inc'); //Set the path
@casivaagustin-zz
casivaagustin-zz / gist:4539d0425bff2d8ecf25
Created March 10, 2015 16:25
Apache, get images from production servers instead of find it locally - Drupal Sample
ProxyPassMatch .+/files/(css|js)/.+ !
ProxyPassMatch ^/sites/(.+)/files/(.+)$ http://www.$1/sites/$1/files/$2
@casivaagustin-zz
casivaagustin-zz / gist:9261586
Created February 27, 2014 23:04
nginx location rule to redirect non existing images to another server
#Rewrites the request, extracting a fragment of the file name and using a remote server.
location @fetchFromRemote {
rewrite ^/path/to/images/(.*)$ http://remoteserver.com/other/path/to/images/$1 redirect;
}
#Will try to see if we have the file in this server, is not will use fetchFromRemote
location ~ ^/path/to/images/.*(png|jpg|jpeg|gif|ico|swf)$ {
try_files $uri @fetchFromRemote;
}
#!/bin/bash
SRCROOT=`pwd`;
find . -name '.git' | while IFS=":" read TARGET
do
TARGET_DIR=`dirname $TARGET`;
cd $TARGET_DIR;
echo "=== UPDATE $TARGET_DIR ===";
git pull;