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 DateTime = function() { | |
var now = new Date(); | |
this.year = now.getFullYear(); | |
this.month = ('00' + now.getMonth()).slice(-2); | |
var monthEndDate = new Date(this.year, this.month, 0); | |
this.startDate = this.year + '-' + this.month + '-01'; | |
this.endDate = this.year + '-' + this.month + '-' + monthEndDate.getDate(); | |
} | |
var Profile = function(profileName, tableId) { |
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 | |
use Zend\Loader\StandardAutoloader as Autoloader, | |
Zend\Db\Metadata\Metadata, | |
Zend\Db\Adapter\Adapter as DbAdapter; | |
///////////////////////////////////// | |
// Inicio de configuración | |
///////////////////////////////////// | |
// |
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
//app.js Socket IO Test | |
var app = require('express').createServer(), | |
redis = require('socket.io/node_modules/redis'), | |
io = require('socket.io').listen(app); | |
var pub = redis.createClient(port, "url"); | |
var sub = redis.createClient(port, "url"); | |
var store = redis.createClient(port, "url"); | |
pub.auth('pass', function(){console.log("adentro! pub")}); | |
sub.auth('pass', function(){console.log("adentro! sub")}); |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
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 any brackets with real values | |
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal | |
ssh [user]@[host] | |
cd ~ | |
mkdir [mydomain_com].git | |
cd [mydomain_com].git | |
git init --bare | |
vi hooks/post-receive | |
# Enter the code from the "post-receive" file (in this gist); save + quit |
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 | |
url=http://redefininggod.com | |
webarchive=https://web.archive.org | |
wget="wget -e robots=off -nv" | |
tab="$(printf '\t')" | |
additional_url=url.list | |
# Construct listing.txt from url.list | |
# The list of archived pages, including some wildcard url |
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
Header unset X-Powered-By | |
AddDefaultCharset UTF-8 | |
AddLanguage en-US .html .htm .css .js | |
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml | |
#SetEnv SA Asia/Riyadh | |
Header set X-Frame-Options SAMEORIGIN | |
Header set X-XSS-Protection "1; mode=block" | |
Header set X-Content-Security-Policy "allow 'self';" | |
Header set X-Content-Type-Options "nosniff" | |
ServerSignature Off |
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
Example of vhost configuration in Plesk based server, in this case to disable SSLv2. | |
1) edit/create /var/www/vhosts/domain.com/conf/vhost.conf | |
2) only add the needed commands that you want overwrite: | |
### start ### | |
# General setup for the virtual host, inherited from global configuration | |
DocumentRoot "/var/www/vhosts/domain.com/httpdocs.production" | |
ServerName domain.com:443 |
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 | |
/* | |
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto | |
Version 1.1 | |
Last Modified: 2010-02-17 | |
This library is free software; you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation; either version 2.1 of the License, or (at | |
your option) any later version. |
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 | |
/* | |
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto | |
Version 1.1 | |
Last Modified: 2010-02-17 | |
This library is free software; you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation; either version 2.1 of the License, or (at | |
your option) any later version. |
OlderNewer