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 dddGeo = []; | |
dddGeo[11] = { | |
latitude: -23.547778, | |
longitude: -46.635833 | |
}; // | São Paulo | Região Metropolitana de São Paulo. | |
dddGeo[12] = { | |
latitude: -23.203416, | |
longitude: -45.890627 | |
}; // | São Paulo | São José dos Campos e Região. |
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
SET group_concat_max_len = 204800; | |
SELECT id, GROUP_CONCAT(message SEPARATOR ', ') | |
FROM messages |
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
Security groups | |
21-22 | |
1024-1048 | |
/etc/vsftpd/vsftpd.conf | |
listen=YES | |
anonymous_enable=NO | |
local_enable=YES |
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 | |
$usuario = 'sigep'; | |
$senha = 'n5f9t8'; | |
$contrato = '9912208555'; | |
$cartao = '0057018901'; | |
$context = stream_context_create(array( | |
'ssl' => array( | |
'verify_peer' => false, | |
'verify_peer_name' => false, |
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
mogrify -resize 50% -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off *.jpg |
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
To search scripts, stylesheets and snippets by filename you can use: | |
* Ctrl + O (Windows) | |
* Cmd + O (Mac OSX) | |
To perform a text search within the current file you can use: | |
* Ctrl + F (Windows) | |
* Cmd + F (Mac OSX) |
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
#!/usr/bin/ruby | |
# chkconfig: 35 99 01 | |
# description: EC2 DNS registration | |
# processname: ec2hostname | |
require 'aws-sdk' | |
require 'net/http' | |
`touch /var/lock/subsys/ec2hostname` |
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 | |
appname="my-docker-app" | |
if [ $1 == "deploy" ] | |
then | |
host="ec2-user@ec2" | |
ssh -tt $host "mkdir $appname && cd $appname && sudo chmod 777 * -R" | |
rsync --progress --exclude-from 'deploy.exclude' -avz -e "ssh" . $host:$appname | |
ssh -tt $host "cd $appname && docker build -t $appname ." | |
ssh -tt $host "cd $appname && docker ps -q --filter='image=$appname' | xargs docker stop" |
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
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
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 | |
// | |
// By: Spicer Matthews <[email protected]> | |
// Company: Cloudmanic Labs, LLC | |
// Date: 5/19/2011 | |
// Description: This is an echo server. It will read any messages sent in and then echo them back out. | |
// | |
$hostname = "127.0.0.1"; | |
$portno = "7834"; | |
ob_implicit_flush(); |
OlderNewer