false
null
undefined
+0
,-0
,NaN
,0n
""
(empty string)document.all
in browser environments
Values not on this list are truthy.
trap 'echo hello' INT | |
read | |
# Output: | |
# | |
# % bash trap_basic | |
# ^Chello | |
# ^Chello | |
# ^Chello | |
# ^Chello |
main = do | |
firstName <- getLine | |
print firstName | |
-- Functors apply a function that takes a value and returns a value to a | |
-- wrapped value. | |
class Functor c where | |
fmap :: (a -> b) -> c a -> c b | |
($) :: c a -> (a -> b) -> c b |
#!/usr/bin/env bash | |
set -e | |
# Updates the freedns.afraid.org DNS record for a domain, if the domain's | |
# resolved IP does not match the external IP of the machine running this program. | |
usage() { | |
echo "usage: afraiddns.sh <domain>" | |
exit 1 | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>table-cell</title> | |
<style> | |
ul { | |
background: red; /* purely for visualizing */ | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<b:if cond='data:blog.url == data:blog.homepageUrl'> | |
<title><data:blog.pageTitle/></title> | |
<b:include data='blog' name='all-head-content'/> | |
<meta content='your-keyword-here' name='keywords'/> | |
</b:if> | |
<b:if cond='data:blog.pageType == "item"'> | |
<title><data:blog.pageName/> - <data:blog.title/></title> |
window.onload = () => { | |
var iframe = document.querySelector("iframe"); | |
var container = iframe.contentDocument.querySelector(".container"); | |
var d = iframe.contentDocument.querySelector(".d"); | |
var hackForceRecompute = () => { | |
// Any one of the following is sufficient. | |
iframe.offsetWidth; | |
iframe.offsetHeight; | |
iframe.getBoundingClientRect(); |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2016 Nishanth Shanmugham | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
var app = require('app'); | |
var Menu = require('menu'); | |
var Tray = require('tray'); | |
var appIcon = null; | |
app.on('ready', function(){ | |
// image is null, so image will not be shown in menu bar | |
// so click around on the system menu bar to locate the space where the tray icon is | |
appIcon = new Tray(null); |
I hereby claim:
To claim this, I am signing this object: