| ; A MICRO-MANUAL FOR LISP - NOT THE WHOLE TRUTH, 1978 | |
| ; John McCarthy, Artificial Intelligence Laboratory, Stanford University | |
| ; https://www.ee.ryerson.ca/~elf/pub/misc/micromanualLISP.pdf | |
| ; https://github.com/jaseemabid/micromanual | |
| ; for CL : Rainer Joswig, joswig@lisp.de | |
| ; this version runs in a Common Lisp |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
Author: Chris Lattner
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit
| #!/bin/bash | |
| # this script installs GCC 4.9.3 | |
| # to use it navigate to your home directory and type: | |
| # sh install-gcc-4.9.3.sh | |
| # download and install gcc 4.9.3 | |
| wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gz | |
| tar xzf gcc-4.9.3.tar.gz | |
| cd gcc-4.9.3 |
| (function(self){ | |
| if (self.Promise) return | |
| // Implements https://promisesaplus.com | |
| function isFunction(fn) { | |
| return typeof fn == 'function' | |
| } | |
| // Values that should never be checked for presence of a `then` method | |
| function simpleValue(fn) { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
| #!/usr/bin/env ruby | |
| url_matcher = %r{REDISCLOUD_URL:\s*redis://rediscloud:(\w+)@([\w\-.]+):(\d+)} | |
| env_string = `heroku config | grep REDISCLOUD_URL` | |
| env_settings = env_string.split('\n') | |
| match_data = url_matcher.match(env_settings[0]) | |
| db = ARGV[0] || 0 |
