Skip to content

Instantly share code, notes, and snippets.

module Main where
import Lib
import Data.List
main :: IO ()
main = someFunc
add :: Integer -> Integer -> Integer
add a b =
@kotlas92
kotlas92 / Oracle shrink datafiles
Last active April 29, 2019 11:34
Oracle shrink datafiles
-- https://blog.dbi-services.com/resize-your-oracle-datafiles-down-to-the-minimum-without-ora-03297/
set linesize 1000 pagesize 0 feedback off trimspool on
with
hwm as (
-- get highest block id from each datafiles ( from x$ktfbue as we don't need all joins from dba_extents )
select /*+ materialize */ ktfbuesegtsn ts#,ktfbuefno relative_fno,max(ktfbuebno+ktfbueblks-1) hwm_blocks
from sys.x$ktfbue group by ktfbuefno,ktfbuesegtsn
),
@jfie5
jfie5 / lessc_install.md
Last active May 11, 2021 13:49
Install LESS (lessc) on Mac OS X.

Install Xcode Command Line Tools

xcode-select --install

Install Node.js (Node Package Manager - npm will be used to install lessc)

git clone git://github.com/ry/node.git
cd node

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)