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 time | |
def create_throttled_function(func, period): | |
"""Creates a throttled version of the given function that can only be called once every 'period' seconds.""" | |
last_called = [0] | |
def throttled_function(*args, **kwargs): | |
nonlocal last_called | |
current_time = time.time() |
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
$ = require "jquery" | |
pako = require('pako') | |
bz2 = require('unbzip2-stream') | |
BrowserStdout = require('browser-stdout') | |
decoder = new TextDecoder("utf-8") | |
stream = new WritableStream |
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
<--- Last few GCs ---> | |
[83252:0x102801e00] 10819832 ms: Mark-sweep 1373.1 (1426.8) -> 1373.1 (1426.8) MB, 689.2 / 0.0 ms allocation failure GC in old space requested | |
[83252:0x102801e00] 10820615 ms: Mark-sweep 1373.1 (1426.8) -> 1373.1 (1425.8) MB, 674.8 / 0.0 ms last resort GC in old space requested | |
[83252:0x102801e00] 10821423 ms: Mark-sweep 1373.1 (1425.8) -> 1373.1 (1425.8) MB, 807.3 / 0.0 ms last resort GC in old space requested | |
<--- JS stacktrace ---> | |
==== JS stack trace ========================================= |
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
0xb635af7996cb6b8fe113f88f5a6846cc4a8fb083 |
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 : "" |
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
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
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
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 @kdApi | |
constructor : (className,funcName) -> | |
data = @runFunction(className,funcName,data) | |
getInstance : (className) -> | |
inst = false | |
try if eval(className) then inst = eval("new "+className+"()") | |
return inst | |
NewerOlder