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
// | |
// main.cpp | |
// Cpp11Tryout | |
// | |
// Created by Dan Munckton on 01/05/2014. | |
// Copyright (c) 2014 Dan Munckton. All rights reserved. | |
// | |
#include <iostream> | |
#include <functional> |
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
module A | |
module_function | |
def a | |
'I am a' | |
end | |
def b | |
'I am b' | |
end |
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
using CSV, DataFrames, Query | |
struct Record | |
class_name::String | |
public::Bool | |
item_type::String | |
item_name::String | |
end | |
function parse_file(file_name::String)::Array{Record} |
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
javascript:(() => { | |
const anchors = Array.from(document.querySelectorAll('a.anchor-link,a.jp-InternalAnchorLink')); | |
const linkData = anchors.map( | |
a => [ | |
Number(a.parentElement.tagName[1]), | |
a.parentElement.firstChild.textContent, | |
new URL(a.href).hash | |
] | |
); |
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
{ | |
"env": { | |
"HOME": "/Users/danm" | |
}, | |
"configurations": [ | |
{ | |
"name": "Arduino AVR 4.9.2 UNO", | |
"includePath": [ | |
"${HOME}/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/cores/arduino", | |
"${HOME}/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/variants/standard", |
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
# Sums two bits | |
def half_adder(a, b) | |
sum = a ^ b | |
carry = a & b | |
[carry, sum] | |
end | |
# Sums three bits | |
def full_adder(a, b, c) | |
carry1, sum1 = half_adder(a, b) |
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
/* | |
* 1. Load your SVGs into a page using a <use> element. | |
* 2. Paste this into you developer console and run it. | |
* 3. It will print out the viewBox values you need for each SVG. | |
*/ | |
(() => { | |
'use strict'; | |
let f = (e) => { | |
let id = e.attributes['xlink:href'].value; |
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
// Paste this into the Chrome Dev Console when on a Trello board | |
// Estimates are expected to be integers wrapped in square brackets at the start of the card name e.g. | |
// "[2] as a developer I want a way to total estimates on Trello cards so I can keep stats" | |
(() => { | |
'use strict' | |
class Card { | |
static all($scopeElem) { | |
return Array.from($scopeElem.querySelectorAll('.list-card')).map(($elem) => { | |
return new Card($elem) |
NewerOlder