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
-- disable foreign check | |
SET FOREIGN_KEY_CHECKS=0; | |
-- execute delete query | |
DELETE FROM BridgeDomainsTags; | |
-- enable foreign check | |
SET FOREIGN_KEY_CHECKS=1; |
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
# replace <process_name> with real process name | |
kill -s KILL `ps faux | grep <process_name> | grep php | egrep -o '\s+([0-9]*)\s+.*' | egrep -o '[0-9]+\s*' | head -1` |
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 | |
/* path to Zend library*/ | |
set_include_path(__DIR__ . "/libs"); | |
/* include Zend loader (Zend root) */ | |
require_once __DIR__ . "/libs/Zend/Loader.php"; | |
/* load class */ | |
Zend_Loader::loadClass('Zend_Json_Server'); | |
$server = new Zend_Json_Server(); |
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 -f *.svg.png | |
for f in *.svg; do | |
echo "File -> $f" | |
qlmanage -t -s 1000 -o . $f | |
done | |
for f in *.svg.png; do |
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
<html> | |
<head> | |
<title>test bot trap</title> | |
<script type="text/javascript"> | |
// Set cookie. | |
function setCookie(name, value, expires, path, domain, secure) { | |
document.cookie = name + "=" + escape(value) + | |
((expires) ? "; expires=" + expires : "") + | |
((path) ? "; path=" + path : "") + |
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> | |
RewriteEngine On | |
# redirect every requested real file (.js, .css, ecc ...) to webpack dev server | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule ^public/assets/(.*)$ http://localhost:3000/assets/$1 [L] | |
</IfModule> |
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 | |
EMI=/etc/issue | |
NODE=`which node` | |
NPM=`which npm` | |
APACHE=httpd | |
echo AMI VERSION: `cat $EMI | grep -Eo [0-9\.]+` | |
echo NODE VERSION: `$NODE -v` | |
echo NPM VERSION: `$NPM -v` |
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
<VirtualHost *:443> | |
SSLEngine on | |
SSLCertificateFile "/etc/ssl/ssl_certificate.crt" | |
SSLCertificateKeyFile "/etc/ssl/ssl_certificate.key" | |
SSLCACertificateFile "/etc/ssl/ssl_certificate.ca-bundle" | |
ServerAdmin admin@mysite.com | |
DocumentRoot /var/www/html/mysite | |
ServerName www.mysite.com |
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
<VirtualHost *:80> | |
# add this in apache virtualhost configuration file to avoid CORS problem enabling request from multiple origin | |
# (optionally change LocationMatch path) | |
<LocationMatch "/"> | |
Header set Access-Control-Allow-Origin "*" | |
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" | |
Header set Access-Control-Max-Age "1000" | |
Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" | |
</LocationMatch> | |
</VirtualHost> |
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
# swap space allocation | |
sudo fallocate -l 1G /var/swap.1 | |
# or use following command that agnostic about distro | |
#sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo chmod 600 /var/swap.1 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
# check if swap is up in the right way | |
sudo swapon --show |
OlderNewer