WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
- RD - research&development
- PR - product
- IP - in-house product
- CO - consulting
#!/bin/bash | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
/* | |
Copyright 2012-2021 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
module Main where | |
{-| | |
We use a 'Data.Char' here. Who ever needs to convert | |
to snake_case or CamelCase unicode strings?.. | |
-} | |
import Data.Char (toUpper, toLower, isUpper) | |
----------------------------------------------------------------------------- |
-- | |
-- Table structure for table `currency` | |
-- | |
CREATE TABLE IF NOT EXISTS `currency` ( | |
`iso` char(3) CHARACTER SET utf8 NOT NULL DEFAULT '', | |
`name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, | |
PRIMARY KEY (`iso`), | |
UNIQUE KEY `name` (`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
// Usage: | |
// AudioTrack tone = generateTone(440, 250); | |
// tone.play(); | |
// | |
private AudioTrack generateTone(double freqHz, int durationMs) | |
{ | |
int count = (int)(44100.0 * 2.0 * (durationMs / 1000.0)) & ~1; | |
short[] samples = new short[count]; | |
for(int i = 0; i < count; i += 2){ | |
short sample = (short)(Math.sin(2 * Math.PI * i / (44100.0 / freqHz)) * 0x7FFF); |
WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
; there are some obvious micro optimizations, I left them out for clarity (see the other file for an optimized version) | |
; the relative ordering of read and writes with volatile and plain array should be thread-safe (if not, point it out) | |
; @wagjo asked "Have you found use for such concept? Must be pretty slow compared to unchunked one" | |
; The idea came out of a discussion on transducers so not used for real, yet. | |
; Once you optimize it (remove the boxing induced by the volatile, switch to unchecked math) there should not be much | |
; of an overhead. | |
; When you have one big composed reducing fn (eg several mapping stages) then each item is going to be processed in | |
; each stage, each stage of the mapping may evict from the data cache stuff used by previous stages. So you have cache | |
; misses for each item. |
// lets define Applicative Functor for (->)r type (function of function) | |
// tip: similar to Reader monad. | |
infix operator <*> { associativity left precedence 150 } | |
func <*> <A, B, C> (f : A -> B -> C, g : A -> B)(x : A) -> C { | |
return f (x) (g(x)) | |
} | |
infix operator <|> { associativity left precedence 150 } | |
func <|> <A, B, C> (f : A -> B -> C, g : C -> A) -> C -> B -> C { | |
return pure(f) <*> g |
# Add these lines to your dockerfile, before `npm install` | |
# Copy the bitbucket private key to your docker image | |
COPY ./bitbucket_ssh_key /opt/my-app | |
# Copy the ssh script to your docker image | |
COPY ./ssh-bitbucket.sh /opt/my-app | |
# Tell git to use your `ssh-bitbucket.sh` script | |
ENV GIT_SSH="/opt/map-project-tile-server/ssh-bitbucket.sh" |