Skip to content

Instantly share code, notes, and snippets.

View NickNeck's full-sized avatar
🕊️
💙 💛

Marcus Kruse NickNeck

🕊️
💙 💛
  • Dortmund, Germany
View GitHub Profile
@NickNeck
NickNeck / update.ex
Created January 25, 2020 13:07
An Elixir update macro
defmodule Update do
@doc """
# Eamples
iex> import Update
Update
iex> x = 5
5
iex> x = update x when rem(x, 2) != 0, do: x * 2
10
@NickNeck
NickNeck / addedWindowProperties.js
Created August 25, 2016 06:49
A function to check what was added to the global window object.
/**
* A function to check what was added to the global window object.
*/
window.addedWindowProperties = function() {
// Add an iFrame to get a reference window.
var iFrame = document.createElement('iframe');
document.body.appendChild(iFrame);
// Get all property names of the current window and filter all names that
// are properties of the reference.