This file contains 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
{ | |
"actstat": { | |
"convert": { | |
"actstatid": "int" | |
} | |
}, | |
"addrobj": { | |
"null": [ | |
"actstat", | |
"nextid", |
This file contains 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
fias=> SELECT housenum FROM house ORDER BY substring(housenum FROM '\d+')::int, housenum; | |
housenum | |
---------- | |
1/1 | |
2 | |
2а | |
2г | |
3 | |
3а |
This file contains 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
-- | Little helper to apply default service namespace to a node and it's descendants. | |
-- This removes the necessity to flood your code with {http://vendor.silly.web/Service.spamx} in element names. | |
flowNS :: Maybe Text -> Node -> Node | |
flowNS ns (NodeElement (Element (Name local Nothing prefix) as cs)) = NodeElement $ Element (Name local ns prefix) as $ map (flowNS ns) cs -- update element ns and continue | |
flowNS ns (NodeElement (Element name@(Name _ ns' _) as cs)) = NodeElement $ Element name as $ map (flowNS ns') cs -- switch to new namespace and continue | |
flowNS ns node = node -- ignore non-element nodes |
This file contains 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 #-} | |
import Web.Scotty | |
import Network.AMQP | |
import Control.Monad.Trans (liftIO) | |
import qualified Control.Exception as E | |
import qualified Data.Text.Lazy as TL | |
import qualified Data.ByteString.Lazy.Char8 as LBS |
This file contains 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 Data.Aeson | |
import Network.HTTP | |
import System.Environment (getArgs) | |
import Control.Monad (mapM_) | |
import Data.Maybe (fromMaybe) | |
import qualified Data.ByteString.Lazy.Char8 as LBS | |
import qualified Data.Text as T | |
import qualified Data.HashMap.Strict as HM |
This file contains 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
\documentclass[a4paper]{article} | |
% Cyrillic support | |
\usepackage[T2A]{fontenc} | |
\usepackage[utf8]{inputenc} | |
\usepackage[english,russian]{babel} | |
\DeclareSymbolFont{T2Aletters}{T2A}{cmr}{m}{it} | |
% PDF search & cut'n'paste | |
\usepackage{cmap} |
This file contains 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
>>> scrape("eax.me")[:5] | |
[['books-issue-2/', '33', '9.2%', '148', '8.5%', '0', '0.0%', '102', '6.4%'], | |
['/', '24', '6.7%', '121', '6.9%', '108', '6.2%', '108', '6.8%'], | |
['goodbye-freebsd/', '23', '6.4%', '115', '6.6%', '25', '1.4%', '136', '8.6%'], | |
['books-issue-1/', '23', '6.4%', '78', '4.5%', '58', '3.3%', '84', '5.3%'], | |
['scala-regular-expr/', '16', '4.5%', '3', '0.2%', '0', '0.0%', '1.6', '0.1%']] |
This file contains 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
module Main where | |
import Network.TLS (PrivateKey) | |
import Network.TLS.Extra as TLS | |
import Network.HTTP.Conduit | |
import Data.Certificate.X509 (X509) | |
import qualified Data.ByteString.Lazy.Char8 as LBS | |
import System.Environment (getArgs) |
This file contains 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 WSTestCtrl($scope, ws) { | |
$scope.method = 'ping' | |
$scope.params = '[]' | |
$scope.reply = 'None yet.' | |
$scope.reply_class = 'info' | |
$scope.go = function(){ | |
ws.call($scope.method, JSON.parse($scope.params)).then(function(d){ | |
$scope.reply = JSON.stringify(d) |
This file contains 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
http://www.reddit.com/r/programming/ | |
lol | |
Юникод лол, смотрите, ЮНИКОД! |