This file contains hidden or 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
# | |
# Validate dates of type DD.MM.YYYY | |
# consider number of days in month and leap years | |
# also year span is from 1900 to 2999 | |
# | |
my $re = qr{ | |
^(?:(?:31\.(?:0?[13578]|1[02]))\.|(?:(?:29|30)\.(?:0?[1,3-9]|1[0-2])\.))(?:(?:19|2\d)?\d{2})$ | |
| | |
^(?:29\.0?2\.(?:(?:(?:19|2\d)?(?:0[48]|[2468][048]|[13579][26]))))$ | |
| |
This file contains hidden or 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 './index.css' | |
createCanvas = (el, width, height) -> | |
c = document.createElement 'canvas' | |
ctx = c.getContext('2d') | |
c.setAttribute 'width', width | |
c.setAttribute 'height', height | |
ctx.fillStyle = '#FFFFFF' | |
ctx.fillRect 0, 0, width, height | |
el.appendChild c |
This file contains hidden or 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
{ | |
"name": "PuppyPool", | |
"description": "Puppy pool", | |
"ticker": "PUPS", | |
"homepage": "https://teststakepool.com" | |
} |
This file contains hidden or 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
0x481fff417ab8b8fd554a373bd462128560909fc4 |
This file contains hidden or 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 http = require('http'); | |
const RetryIntervals = [500, 1000, 4000]; | |
const retryTries = 4; | |
function pingService(retryInterval, retryTry) { | |
if(retryTry >= retryTries) { | |
console.log(`ping not ok after ${retryTries} retries, giving up.`); |
This file contains hidden or 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
function mybind(f, o) { | |
return function() { | |
return f.apply(o, arguments); | |
}; | |
} |
This file contains hidden or 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
<script src="https://vk.com/js/api/xd_connection.js?2" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function onInit() { | |
console.log("Post ID"); | |
} | |
VK.init(function() { | |
// API initialization succeeded |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Debug.Trace (trace, traceM, traceStack, traceShowM) | |
import Control.Applicative | |
import Control.Monad (unless, forM_, forM, void, mzero) | |
import Data.Char (isAlpha, isAlphaNum) | |
import qualified Text.Parsec as P | |
import Text.Parsec.Text |
This file contains hidden or 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 Html exposing (..) | |
import Debug exposing (..) | |
import Array exposing (Array, repeat, set, get, toList, initialize) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (on, onClick, targetChecked) | |
import Signal exposing (Address) | |
import StartApp.Simple as StartApp | |
main = |
This file contains hidden or 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
/** @jsx React.DOM */ | |
var MyComponent = React.createClass({ | |
render: function() { | |
// Defaults in case the props are undefined. We'll have a solution for this | |
// soon that is less awkward. | |
var perMinute = this.props.perMinute || '-'; | |
var perDay = this.props.perDay || '-'; | |
return ( | |
<div> | |
<h3>Clickouts</h3> |