Skip to content

Instantly share code, notes, and snippets.

RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</virtualhost>
Listen 443
<VirtualHost *:443>
ServerAdmin zadmin@localhost
DocumentRoot "/etc/sentora/panel/"
DROP TABLE IF EXISTS `files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`path` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
`users_id` int(11) NOT NULL,
`created` datetime NOT NULL,
@codephi
codephi / 0_reuse_code.js
Created October 12, 2015 09:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
$localidades = ['logradouro', 'bairro', 'cidade', 'cep', 'pais'];
$conditions = [];
do{
if(isset($this->request->data[current($localidades)]))
$conditions['l.'.current($localidades)] = '%'.$this->request->data[current($localidades)].'%';
}
while(next($localidades));
@codephi
codephi / headhunter.js
Last active August 29, 2015 14:24
Vaga Para Desenvolvedor Web com foco em Frontend ... Detalhes da vaga no script....
/** **********************
Talent wanted!
Web developer.
Focus on Frontend.
##Salary and assistance##
Salary --- R$ 2.500,00 CLT
Assistance --- R$ 400,00
##Local##