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
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
ini_set("display_errors",1); | |
ini_set("error_reporting",E_ALL); | |
$conn = mssql_connect('localhost','user', 'pass'); | |
mssql_select_db('database', $conn); |
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 | |
#Esse simples script realiza o ZIP dos arquivos de uma determinada pasta e | |
#em seguida os envia via rsync para um outro servidor. | |
#É necessário que em sua maquina você tenha instalado o rysnc | |
#É necessário também a criação de uma chave ssh para que não seja necessário a digitação de senha | |
echo "Iniciando compressão de arquivos da pasta de uploads"; | |
zip -9 -r /root/files-backup/backup-arquivos-site-`date +"%d_%m_%Y"`.zip /var/www/html/site/public/files; |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="UTF8" /> | |
<head> | |
<title>Login</title> | |
</head> | |
<body> | |
<?php | |
require 'vendor/autoload.php'; |
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
#This is an simple proxy configuration for Ubuntu (tested only in Ubuntu) | |
#With this configuration you will shurf on web, use apt or aptitude, use curl | |
#and use the composer (getcomposer.org) | |
#If you run some command with sudo you can get some trouble | |
#If you are in trouble use sudo -E | |
#In ~/.bashrc put these configs |
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
ls -R ./ | awk '/:$/&&f{s=$0;f=0} /:$/&&!f{sub(/:$/,"");s=$0;f=1;next} NF&&f{ print s"/"$0 }'| xargs file -i |
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
#make svn diff with colors! like git, but frist youn need install colordiff (via apt-get) | |
svn diff $* | colordiff | more |
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 | |
fwrite(STDOUT, "\0337"); | |
for ($i=0; $i <=100 ; $i+=5) | |
{ | |
fwrite(STDOUT, "\0338" . "{$i}%complete"); | |
usleep(1000000); | |
} |
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
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
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
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<project name="ProjectName" basedir="." default="build"> | |
<property name="project-name" value="ProjectName" /> | |
<property name="tag-name" value="." /> | |
<property name="dir-build" value="./build" /> | |
<property name="dir-tests" value="tests" /> | |
<property name="dir-tests-logs" value="tests/_reports" /> | |
<property name="dir-logs" value="./build/logs" /> | |
<property name="dir-app" value="./core" /> |
OlderNewer