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 jsAddSlashes($str) { | |
$pattern = array( | |
"/\\\\/" , "/\n/" , "/\r/" , "/\"/" , | |
"/\'/" , "/&/" , "/</" , "/>/" | |
); | |
$replace = array( | |
"\\\\\\\\", "\\n" , "\\r" , "\\\"" , | |
"\\'" , "\\x26" , "\\x3C" , "\\x3E" | |
); | |
return preg_replace($pattern, $replace, $str); |
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
ini_set('display_errors', 1); | |
ini_set('log_errors', 1); | |
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); | |
error_reporting(E_ALL); |
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
#----------------------- | |
# robots.txt | |
#----------------------- | |
user-agent: * | |
disallow: /img/ | |
disallow: /css/ | |
disallow: /js/ | |
disallow: /integ/ | |
disallow: /captcha/ | |
disallow: /admin/ |
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(){ | |
})() |
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
Step 1: Upgrade Packages | |
# yum update | |
# yum groupinstall "Development Tools" | |
Step 2: Installing Recommended Packages | |
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel | |
# yum install libyaml-devel libffi-devel openssl-devel make | |
# yum install bzip2 autoconf automake libtool bison iconv-devel | |
Step 3: Install RVM ( Ruby Version Manager ) |
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
Apache logs location on Plesk: | |
/var/log/httpd/access_log | |
/var/log/httpd/error_log | |
Apache Suexec logs location on Plesk: | |
/var/log/httpd/suexec_log | |
Access and Error logs for a specific account / user / website on Plesk: |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
# For a list of vagrant boxes visit the site below | |
# http://www.vagrantbox.es/ | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
#Options -MultiViews | |
</IfModule> | |
SetEnv LARAVEL_ENV production | |
RewriteEngine On | |
# Redirect Trailing Slashes... |
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
var url = 'participants/save'; | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: url, | |
cache: false, | |
data: { | |
fbid: response.id, | |
fullname: response.name, | |
firstname: response.first_name, |
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
<script> | |
if (typeof jQuery === "undefined") { throw new Error("This application requires jQuery"); } | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: 'xxxxxxx', | |
status: true, // check login status | |
xfbml: true, | |
version: 'v2.1' | |
}); |
OlderNewer