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
function get_4sq_venue_name($url){ | |
$curl_handle=curl_init(); | |
curl_setopt($curl_handle,CURLOPT_URL,$url); | |
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); | |
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); | |
curl_setopt($curl_handle,CURLOPT_FOLLOWLOCATION,1); | |
curl_setopt($curl_handle,CURLOPT_HEADER,1); | |
$buffer = curl_exec($curl_handle); | |
curl_close($curl_handle); |
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
/* use this function before inserting any array to mongo */ | |
array_walk_recursive($array,"typeCast"); | |
/* then do insert: $mongo->$db->$collection_name->insert($array); */ | |
/* careful with & sign before the $item, dont remove it, */ |
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
$q = array("myKey" => array('$exists'=>true)); | |
$cursor = $mongo->db->coll->find($q); | |
echo $cursor->count(); // this returns the number 51 | |
while($cursor->hasNext()){ | |
$v = $cursor->getNext(); | |
print_r($v); // this returns nothing |
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
class a | |
b:-> | |
"foo" | |
class kdApi | |
constructor : (className,funcName) -> | |
if [className][funcName] | |
console.log "class and function exists" | |
else |
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
class @kdApi | |
constructor : (className,funcName) -> | |
data = @runFunction(className,funcName,data) | |
getInstance : (className) -> | |
inst = false | |
try if eval(className) then inst = eval("new "+className+"()") | |
return inst | |
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
class kdApi | |
@tries=0 | |
constructor:-> | |
@apicall(1) | |
returned:(r)-> | |
if r isnt 10 | |
setTimeout () => | |
@apicall r | |
,1000 |
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
class a extends b | |
miki:-> | |
alert "test" | |
class b | |
niki:-> | |
alert "loo" | |
x = new a() | |
a.miki() |
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
array_walk_recursive($array,"typeCast"); | |
// then insert to mongo->coll->save($array) | |
function typeCast(&$item,$key){ | |
if(is_numeric($item)) $item = (float) $item; | |
else $item = (string) $item; | |
} |
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
package main | |
import ( | |
"fmt" | |
) | |
func f() (ret int) { | |
defer func() { | |
ret++ | |
}() |
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
[ | |
name : "slowloris.pl" | |
url : "" | |
description : "" | |
detectionFilters : | |
fs : ["slowtoris","strg"] # keywords that we search in FS | |
proc : ["strg","slowtoris"] # in processes list | |
, | |
name : "second-malware" | |
url : "" |
OlderNewer