This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#files=`find "$PWD" -type f \( -name \*.css -o -name \*.js \) | grep -vP '^(.*).min.css$' | grep -vP '^(.*).min.js$'` # pega todos os arquivos | |
files=`find "$PWD" -type f \( -name \*.css -o -name \*.js \) -mmin -30 | grep -vP '^(.*).min.css$' | grep -vP '^(.*).min.js$'` # pega todos os arquivos | |
for file in $files; do | |
extention="${file##*.}" | |
if [ "css" == "$extention" ]; then | |
dname="${file%/*}" | |
fname="${file##*/}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Format: UTF8 | |
# Sometimes there are some strange names which can generate a filesystem inconsistency if not | |
# corrected, therefore this script can be used to find files with those filename inconsistensies | |
PATH=/usr/local/bin/:/usr/bin/:/bin/:$PATH | |
find . -type f > filenames | |
while read filename; do | |
stripped="$(printf '%s\n' "$filename" | tr -d -C '[[:alnum:]][[:space:]][[:punct:]]')" | |
test "$filename" = "$stripped" || printf '%s\n' "$filename"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
USE `YOUR DATABASE`$$ | |
DROP FUNCTION IF EXISTS `BASE64_ENCODE`$$ | |
CREATE DEFINER=`YOUR DATABASE`@`%` FUNCTION `BASE64_ENCODE`(input BLOB) RETURNS BLOB | |
DETERMINISTIC | |
SQL SECURITY INVOKER | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP FUNCTION IF EXISTS `slugify`; | |
DELIMITER ;; | |
CREATE DEFINER=CURRENT_USER | |
FUNCTION `slugify`(dirty_string varchar(200)) | |
RETURNS varchar(200) CHARSET latin1 | |
DETERMINISTIC | |
BEGIN | |
DECLARE x, y , z Int; | |
Declare temp_string, new_string VarChar(200); | |
Declare is_allowed Bool; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf /tmp/gitlist.text | |
for f in $(echo -e "`git status | awk -F" " '{printf "%s\n", $3}' | tail -n+6 | head -n-7`"); do | |
git diff $f >> /tmp/gitlist.text | |
echo >> /tmp/gitlist.text | |
done | |
less /tmp/gitlist.text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# - To restore the database you can use the command bellow which whill return the file | |
# whithout send any output to the screen | |
# mysql -h 127.0.0.1 -A -u root -e "USE db_name; \. databasefile.sql" | |
PROGNAME=${0##*/} | |
PROGVERSION=0.9.3 | |
usage() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbw = NULL; | |
$aDatabase = array ( | |
'host' => '', | |
'database' => '', | |
'user' => '', | |
'pwd' => '', | |
); |
NewerOlder