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
# fixes "default: stdin: is not a tty" error message | |
# source: http://foo-o-rama.com/vagrant--stdin-is-not-a-tty--fix.html | |
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" | |
# fixes "dpkg-reconfigure: unable to re-open stdin: No file or directory" error message | |
# source: http://serverfault.com/a/500778 | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
locale-gen en_US.UTF-8 |
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
/* | |
* Dependends on: https://philipwalton.github.io/polyfill | |
* Only works for: | |
* -> clip-path: inset | |
* -> absolute/fixed positioned elements | |
*/ | |
function ClipPath() { | |
var rectVals, rectElements, //read by setRectOnElements, set by init | |
polyfill = new Polyfill({ |
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
let observer = new MutationObserver(mutations => { | |
mutations.forEach(mutation => { | |
if(mutation.attributeName === "attributeeditable") { | |
if(mutation.target.hasAttribute("attributeeditable") && mutation.target.getAttribute("attributeeditable") !== 'false') { | |
createPopovers(); | |
} else { | |
editAttributes(mutation.target); | |
mutation.target.removeAttribute("data-attributeeditable"); | |
} | |
} |
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
google-site-verification: googledf49824418c4dc3a.html |
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
console.log=(()=>{var c=console.log;return(...d)=>{c(...(1==d.length&&d[0].charAt?['%c'+d[0],'font:1em Comic Sans MS']:d))}})(); |
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
const keva = require('keva'); | |
module.exports = (name, json) => { | |
let schema = { | |
definitions: {}, | |
title: name, | |
type: 'object', | |
properties: json | |
}; | |
schema.properties = convert(schema.properties, schema.definitions); |
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 href = 'remscroll.js:' + window.location.href; | |
window.addEventListener('load', () => { | |
let scrollPos = localStorage.getItem(href); | |
if(scrollPos) { | |
document.scrollingElement.scrollTop = Number(scrollPos); | |
} | |
}); | |
document.addEventListener('scroll', () => { |
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
halveEvens :: [Int] -> [Int] | |
halveEvens xs = [x `div` 2 | x <- xs, x `mod` 2 == 0] |
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
-- Informatics 1 - Functional Programming | |
-- Tutorial 3 | |
-- | |
-- Week 5 - Due: 19-20 Oct. | |
module Tutorial3 where | |
import Data.Char | |
import Test.QuickCheck |
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
import Data.Char | |
import Test.QuickCheck | |
-- count str = length [c | c <- str, isUpper c || isDigit c] | |
count = length . filter c | |
where c x = isUpper x || isDigit x | |
countRec [] = 0 | |
countRec (c:str) = (if isUpper c || isDigit c then 1 else 0) + countRec str |
OlderNewer