An account has many different forms and can be used in different ways. When users create an account an attacker could try to frontrun the transaction. The attacker would mutate the guard associated with the account, hoping the user won't notice or worse tokens are already on it's way to this newly created account. We can prevent such attacks by providing a way to pin an account to it's guard. If the attackes decides to mutate the guard now,
Modules can be brought into scope dynamically. This can be done like:
(defun test(referenced-module:module{interface-of-module})
(module::a-function-that-is-defined-on-the-interface))
This is useful for it's dynamic nature, but brings potential vulnerabilities
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
#!/usr/bin/env node | |
const fs = require("fs"); | |
const acceptedArgs = ["--send", "--local", "--node"]; | |
const { send, local, node } = process.argv.reduce((args, arg) => { | |
const [key, value] = arg.split("="); | |
if (!value) return args; | |
if (!acceptedArgs.includes(key)) return args; | |
return { ...args, [key.replace("--", "")]: value }; | |
}, {}); |
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
# this cleans up your dead containers, cleaned up 50gigs before... | |
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -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
#!/bin/bash | |
function print_help_dup() { | |
echo " usage:" | |
echo " dup [-i|--image] (options)" | |
echo | |
echo " -i|--images required The name of the docker image you to load into your container" | |
echo " dup -i node" | |
echo " -cmd|--command optional Provide a different command to run" | |
echo " default: /bin/bash" |
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
--- | |
Banana | |
type: object | |
properties: | |
id: | |
type: string | |
description: Mongoose ID | |
description: | |
type: string | |
description: Some text to describe this specific banana |
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 Router(){ | |
this.addRoute = function addRoute(route){ | |
route.url = route.url || 'defaultUrl'; | |
route.name = route.name || 'defaultName'; | |
// Do your stuff | |
} | |
} |
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
'use strict'; | |
var express = require('express'); | |
var mongoskin = require('mongoskin'); | |
var allowCrossDomain = function(req, res, next) { | |
res.header('Access-Control-Allow-Origin', '*'); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); | |
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With'); |
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
var Animal = clazz(function Animal(){ | |
this.private = { | |
name: 'animal' | |
}; | |
this.public = { | |
sayHello: function sayHello(){ | |
return 'Hi, my name is ' + this.private.name + '!'; | |
} | |
}; | |
NewerOlder