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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] |
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 lang="en"> | |
<head> | |
<title>My Add to Page Dialog Page</title> | |
</head> | |
<body> | |
<div id='fb-root'></div> | |
<p> Facebook App ID: <input type="text" id="appid" style="width: 350px"> </p> | |
<p> Redirect URI: <input type="text" id="appuri" style="width: 350px"> </p> |
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
# To manually alter the autorun parameter, create a REG_SZ - String Value, named Autorun. As value the absolute path to file, into: | |
# [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
# Command list: | |
# 1 - createrep: Creates a directory and initialize a bare git repository into it | |
# 2 - sass: Runs sass --watch command on filename, creating same filename converted to css. Alternatively, filename can be absolute or relative paths | |
# 3 - sass: Runs sass --watch command on filename, creating converted css named by the second filename. Alternatively, filenames can be absolute or relative paths | |
# --------- 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
<?php | |
/** | |
* PNG ALPHA CHANNEL SUPPORT for imagecopymerge(); | |
* by Sina Salek | |
* | |
* Bugfix by Ralph Voigt (bug which causes it | |
* to work only for $src_x = $src_y = 0. | |
* Also, inverting opacity is not necessary.) | |
* 08-JAN-2011 | |
* |
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
function get_categories_name($post_id, $formated = false, $separator = " + "){ | |
$categories = wp_get_post_categories($post_id); | |
$categories_name = array(); | |
$formatted_string = ""; | |
foreach ($categories as $category){ | |
array_push($categories_name, get_category($category)->name); | |
} | |
if (!$formated) |
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 | |
# | |
# Init file for memcached | |
# | |
# Written by Dag Wieërs <[email protected]> | |
# | |
# chkconfig: - 80 12 | |
# description: Distributed memory caching daemon | |
# | |
# processname: memcached |
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 | |
$randomCoordinated = function($x0, $y0, $radius){ | |
$randomFloat = function($min = 0, $max = 1) { | |
return $min + mt_rand() / mt_getrandmax() * ($max - $min); | |
}; | |
// Convert radius from meters to degrees | |
$radiusInDegrees = $radius / 111000; |
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
// on Vagrantfile: | |
config.vm.synced_folder ".", "/vagrant", type: "virtualbox" | |
// then: | |
vagrant plugin install vagrant-vbguest |
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
If you already have php installed (from repository for example), you can compile only the PDO_OCI from PHP source (you need the instantclient installed) | |
Download the PHP source with same version that you have installed; | |
Unzip; | |
Change to directory php-YOUR-VERSION/ext/pdo_oci | |
Inside the pdo_oci folder, run these commands: | |
$ git clone https://github.com/php/php-src.git | |
$ cd php-src |
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
Na 10, aonde ficam os repositórios, para os projetos que envolvem Santa Catarina foi adicionada a configuração de atualização automática do repositório depois de cada push. A configuração fica no diretório respectivo, em `/Development/repos/<diretorio>.git/hooks`. O arquivo se chama `post-receive`. Caso nunca tenha sido alterada a configuração, o arquivo vai se chamar `post-receive.sample`. Caso seja preciso configurar: | |
* Acessa o diretório do repositório na 10 via terminal. Ex: `$ cd /Development/repos/SadeApplicationPMSC.git` | |
* Acessa o diretório `hooks` | |
* `$ mv post-receive.sample post-receive` | |
* `$ vim post-receive` | |
* Na próxima linha abaixo dos comentários cola a linha alterando o nome do repositório corretamente: `cd /Development/repos/SadeApplicationPMSC.git && git update-server-info` | |
* `:wq` | |
Após o próximo push, quando for necessário realizar pull em ambiente que clonou via HTTP não será mais necessário previamente acessar a 10 e atualizar o repositório via `git update-server-info`. |
OlderNewer