Skip to content

Instantly share code, notes, and snippets.

View jonasfj's full-sized avatar

Jonas Finnemann Jensen jonasfj

View GitHub Profile
@jonasfj
jonasfj / package.json
Created November 7, 2016 20:54
Connect to a one-click-loaner shell using local terminal emulator.
{
"private": true,
"dependencies": {
"docker-exec-websocket-server": "^1.3.1"
}
}
let aws = require('aws-sdk');
let bucket = '<BUCKET TO DELETE>';
let deleted = 0;
setInterval(function() {
console.log("Deleted: " + deleted);
}, 1000);
var Iterate = require(`./`);
// Define a poller operation using Iterate
let Poller = Iterate({
maxIterations: 0,
maxFailures: 7,
maxIterationTime: 45 * 1000,
minIterationTime: 0,
watchDog: 30 * 1000,
waitTime: 500,
@jonasfj
jonasfj / test.py
Last active June 22, 2016 19:34
example that gdb has no magic input limit for python scripts... As otherwise indicated in: https://github.com/baygeldin/gdb-js/blob/512c25d771b61ab1bbcd7b87d28eb73ca3e4c2cb/src/index.js#L13-L14
import os, json
print os.getcwd()
text = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam nec lectus nibh. Pellentesque libero arcu, scelerisque ut porttitor id, mollis et nisi. Phasellus et urna facilisis, ullamcorper velit ac, pulvinar leo. Suspendisse potenti. Donec posuere, lectus at dapibus tristique, tortor leo porttitor libero, id vulputate ligula lacus ut risus. Etiam et auctor nisi. Praesent porttitor eu eros ut consequat. In aliquet neque a erat aliquet, euismod mollis erat lobortis. Duis malesuada odio at ante rhoncus, non varius massa porttitor. Cras at condimentum lorem. Ut efficitur massa id vestibulum ullamcorper. Donec lacinia hendrerit velit, vel facilisis nunc fermentum eu. Praesent nec ligula vulputate, pharetra turpis ac, facilisis sem. Mauris in dui elementum, pharetra elit vel, vulputate ligula. Sed sit amet odio eu dui pulvinar lobortis.
Aenean quis ligula non arcu fringilla placerat. Cras vel orci purus. Pellentesque nec enim nec mauris iaculis eleifend. Mauris u
import taskcluster, boto.s3
auth = taskcluster.sync.Auth()
result = auth.awsS3Credentials('read-write', 'tc-gp-public-31d', 'garbage/')
s3 = boto.s3.connect_to_region(
'us-west-2',
aws_access_key_id=result['credentials']['accessKeyId'],
aws_secret_access_key=result['credentials']['secretAccessKey'],
security_token=result['credentials']['sessionToken'],

Keybase proof

I hereby claim:

  • I am jonasfj on github.
  • I am jonasfj (https://keybase.io/jonasfj) on keybase.
  • I have a public key ASAriV8zGSk-p09W7Z2zGO9MGyfjVgMMwIA__OpqGDHNFgo

To claim this, I am signing this object:

// Create a new object that doesn't have anything modifed...
type BackOffSettings {
InitialInterval time.Duration
RandomizationFactor float64
Multiplier float64
MaxInterval time.Duration
MaxElapsedTime time.Duration
$schema: "http://json-schema.org/draft-04/schema#"
title: "Job Definition"
description: |
Definition of a single job that can be added to Treeherder
Project is determined by the routing key, so we don't need to specify it here.
id: "jobDefinition"
type: "object"
properties:
taskId:
title: "taskId"
@jonasfj
jonasfj / index.html
Created January 27, 2016 06:49
Example XSS
<b>Hi, <span id="name"></span>,</b><br>
Enter your deepest secret and I'll remeber it:<br>
<input type="text" id="secret"><button onClick="save()">Save</button>
<script>
// Load name from location.hash
document.getElementById("name").innerHTML = decodeURIComponent(window.location.hash);
// Load existing secret
document.getElementById("secret").value = (localStorage.secret || 42);
// Save secret
function save() {
@jonasfj
jonasfj / index.html
Created January 27, 2016 06:48
Example XSS
<b>Hi, <span id="name"></span>,</b><br>
Enter your deepest secret and I'll remeber it:<br>
<input type="text" id="secret"><button onClick="save()">Save</button>
<script>
// Load name from location.hash
document.getElementById("name").innerHTML = decodeUriComponent(window.location.hash);
// Load existing secret
document.getElementById("secret").value = (localStorage.secret || 42);
// Save secret
function save() {