Skip to content

Instantly share code, notes, and snippets.

View xmd404's full-sized avatar

xavier. xmd404

View GitHub Profile
@xmd404
xmd404 / keybase.md
Created November 1, 2021 18:59
keybase proof

Keybase proof

I hereby claim:

  • I am xmd404 on github.
  • I am xmd404 (https://keybase.io/xmd404) on keybase.
  • I have a public key ASDe8XHZCwlMy_Sk02SQYsIPLCyZ5huvsc4exllCLVjixwo

To claim this, I am signing this object:

@xmd404
xmd404 / bookmarklet.js
Created November 27, 2019 16:22 — forked from mcotton/bookmarklet.js
auto-login bookmarklet
// Saved URL should look like this:
// javascript:<function>
// replace <function> with the following text
(function(){
// Grab the username and password input fields
user = document.getElementById('txtUserName');
pass = document.getElementById('txtPassword');
// Grab the submit button, oddly named 'punch'
@xmd404
xmd404 / simple-contract.md
Last active August 25, 2021 19:43
simple-contract

Simple Contract

Popular open-source contract for web professionals by Stuff & Nonsense. Revised with ❤️ + ⚡️ by xavier

  • Originally published: 23rd December 2008
  • Revised date: 20th September 2018
  • Original post

Between

// Please write your code directly below the corresponding numbers.
// #1
const fullName = 'Xavier Duncan';
const birthYear = 1991;
// #2
const myArray = [];
// #3
myArray.push(fullName, birthYear);
// Please write your code directly below the corresponding numbers.
// #1
let fullName = 'Xavier Duncan';
let birthYear = 1991;
// #2
let myArray = [];
// #3
myArray.push(fullName, birthYear);
@xmd404
xmd404 / function_invocation.js
Created April 4, 2017 03:22 — forked from myshov/function_invocation.js
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);