This file contains hidden or 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 table | |
DROP TABLE cdr; | |
// Set up table | |
CREATE TABLE cdr ( | |
id uuid, | |
imsi bigint, | |
calling_gt bigint, | |
timestamp timestamp, | |
text varchar, |
This file contains hidden or 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 printInputValue(input, output, symbol) { | |
function updateOutput() { | |
$(output).html(input.val() + symbol); | |
} | |
$(input).on("input change", function() { | |
updateOutput(); | |
}); | |
updateOutput(); | |
} |
This file contains hidden or 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
Vagrant.configure("2") do |config| | |
config.vm.box = "hashicorp/precise32" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
config.vm.synced_folder "../yii-framework", "/yii-framework" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.ssh.forward_agent = true | |
end |
This file contains hidden or 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
#!/usr/bin/env bash | |
apt-get update | |
apt-get install -y apache2 libapache2-mod-php5 php5-cli php5-mysql php5-curl php5-mcrypt | |
apt-get install -y curl | |
a2enmod php5 | |
# Add ServerName to httpd.conf | |
echo "ServerName localhost" > /etc/apache2/httpd.conf | |
# Setup hosts file | |
VHOST=$(cat <<EOF | |
<VirtualHost *:80> |
This file contains hidden or 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
$settings = CHtml::listData(GeneralSettings::model()->findAll("`group` = 'email'"), "setting", "value"); | |
$collectLogData = array( | |
"emailServer" => $post["emailServer"], | |
"emailPort" => $post["emailPort"], | |
"emailUsername" => $post["emailUsername"], | |
"emailPassword" => $post["emailPassword"], | |
"emailEncryption" => $post["encryption"], | |
"emailAuth" => $post["emailAuthentication"], | |
); | |
// Compare posted data array with currently saved settings array, and remove key if no difference |
This file contains hidden or 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
server { | |
listen 8080; | |
#listen [::]:80 default_server ipv6only=on; | |
root /var/www/craftsite.com/public; | |
index index.php index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name craftsite.com; |