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
| var rot = function (n, l) { return l.slice(n).concat(l.slice(0,n)); }; |
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
| var points = [[-200,-200],[200,-200],[200,200],[-200,200]], | |
| lines = _(points).zip(rot(1, points)).map(function (x) { | |
| var a = x[0], b = x[1]; | |
| return makeLine(a[0], a[1], b[0], b[1], 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
| TServerTransport serverTransport = new TServerSocket(port); | |
| TThreadPoolServer.Args a = new TThreadPoolServer.Args(serverTransport).processor(processor); | |
| a.maxWorkerThreads(5); | |
| TThreadPoolServer server = new TThreadPoolServer(a); | |
| return server; |
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
| jdk1.7.0/bin/jstat -gccapacity 9043 | tail -n 1 | awk '{ print $4, $5, $6, $10 }' | python -c "import sys; nums = [x.split(' ') for x in sys.stdin.readlines()]; print(str(sum([float(x) for x in nums[0]]) / 1024.0) + ' mb');" |
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
| for F in $(seq 1); do echo "Doing $F"; bash -c 'sleep 1; echo -e "login:a:a;\r\ncommand;\r\nlogout;\r\n"' | netcat localhost 8094; done |
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
| echo "Hello" |
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
| xset b off | |
| xset b 0 0 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
| class Chezzers(sfn.IStepFunctionsTask): | |
| def __init__(self, app, id, **kwargs): | |
| super().__init__(app, **kwargs) | |
| def bind(task): | |
| print("called 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
| async function getAllS3Objects(Params) { | |
| let listing = true; | |
| const objects = []; | |
| while (listing) { | |
| const data = await s3.listObjects(Params).promise(); | |
| if (!data.isTruncated) { | |
| listing = false; | |
| } else { | |
| Params.Marker = data.NextMarker; | |
| } |