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
function isNumber(evt) { | |
evt = (evt) ? evt : window.event; | |
var charCode = (evt.which) ? evt.which : evt.keyCode; | |
return (charCode <= 31 || charCode === 46 || (charCode >= 48 && charCode <= 57)); | |
} |
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
$.ajax({ | |
url: '/url', | |
data: params, | |
type: 'post', | |
dataType: 'json', | |
success: function(response) { | |
}, | |
error: function(response) { | |
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
+ (SPProgress *)sharedInstance { | |
static dispatch_once_t pred; | |
static SPProgress *shared = nil; | |
dispatch_once(&pred, ^{ | |
shared = [[SPProgress alloc] init]; | |
shared.eneArray = [[NSMutableArray alloc]init]; | |
}); | |
return shared; | |
} |
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
//str example | |
-87.6361173230483,41.9184733663886,0 -87.63625063290191,41.9186879407643,0 -87.63638917236651,41.9188946307294,0 -87.63638597726001,41.9196072396054,0 -87.63640288658171,41.9201768975391,0 -87.6364176789852,41.9206761120529,0 -87.6364281700465,41.921033421017,0 -87.6364463383626,41.9216235169182,0 -87.636450850147,41.921817693737,0 -87.63645747855981,41.9219928494608,0 -87.6364639198159,41.9221636969844,0 -87.6364641782462,41.9221721963153 | |
(-\d\d\.+(\d)*)+,(\d\d\.+(\d)*)+,(0) | |
Regex replace | |
new google.maps.LatLng($1,$3), |
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
$("#list_container").on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function (e) { | |
if (e.target == this) { | |
tpListingSearchResults.shuffleObj.shuffle('layout'); | |
} | |
}); |
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
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -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
$tweets = Datostwitter::orderBy('hora', 'desc')->take(Settings::get('twitter_max'))->get(); | |
$pagetweets = []; | |
$total = count($tweets); | |
$itemtw = []; | |
for ($i = 0; $i < $total; $i+=5){ | |
for ($n = 0; $n < 5; $n++){ | |
if (isset($tweets[$i+$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
<?xml version="1.0"?> | |
<ruleset name="PSR2"> | |
<description>The PSR-2 coding standard.</description> | |
<arg name="tab-width" value="4"/> | |
<!-- 2. General --> | |
<!-- 2.1 Basic Coding Standard --> | |
<!-- Include the whole PSR-1 standard --> |
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
server{ | |
server_name gestor.dev; | |
listen 80; | |
root /Users/arzola/Sites/gestor/public; | |
error_log /Users/arzola/Sites/logs/gestor.log; | |
index index.htm index.php; | |
location / { | |
try_files $uri $uri/ /index.php; | |
autoindex on; | |
} |
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
server{ | |
listen 80 default_server; | |
server_name 10.1.17.116; | |
root /Users/arzola/Sites/multiple; | |
location /{ | |
return 410; #Default root does not exists | |
} | |
if (!-d $request_filename){ | |
rewrite ^/(.+)/$ /$1 permanent; | |
} |