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
$ x11vnc -rfbport 1111 -display :1 |
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 { | |
root /www/site/; | |
server_name site.com *.site.com; | |
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { | |
access_log off; | |
log_not_found off; | |
expires 360d; | |
} |
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
import argparse, boto | |
AWS_ACCESS_KEY = '' | |
AWS_SECRET_KEY = '' | |
AWS_CLOUDFRONT_ID = "" | |
def invalidate (f, print_debug=False): | |
from boto.cloudfront import CloudFrontConnection | |
con = CloudFrontConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY) |
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
def cidr_range(cidr): | |
ip, subnet = cidr.split('/') | |
ipint = ip2int(ip) | |
subnet = int(subnet) | |
mask = ''.join(['1' for num in range(subnet)] + ['0' for num in range(32 - subnet)]) | |
inverted_mask = ''.join(['0' for num in range(subnet)] + ['1' for num in range(32 - subnet)]) | |
mask_int = int(mask, 2) |
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
>>> a = None | |
>>> type(a) | |
<type 'NoneType'> | |
>>> a = 1 | |
>>> type(a) | |
<type 'int'> | |
>>> a = "angelo" | |
>>> type(a) |
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
((320*320) * 10) * 0.073 |
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
CSS: | |
#preview-foot { | |
position:absolute; | |
border:1px solid #ccc; | |
background:#333; | |
padding:5px; | |
display:none; | |
color:#fff; |
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
ini_set('log_errors', 'On'); | |
ini_set('error_log', __DIR__ . '/phperrors.log'); | |
ini_set('log_errors_max_len', 0); |
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
<script> | |
$(document).ready(function() { | |
$(".boton") | |
.bind("touchstart", function () { | |
$(this).addClass("active"); | |
}) | |
.bind("touchend", function() { | |
$(this).removeClass("active"); | |
}) | |
.bind("touchcancel", function() { |
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
<?php | |
class Colors { | |
private $foreground_colors = array(); | |
private $background_colors = array(); | |
public function __construct() { | |
// Set up shell colors | |
$this->foreground_colors['black'] = '0;30'; | |
$this->foreground_colors['dark_gray'] = '1;30'; |