View memcache_dump_lru_crawler_metadump.php
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
<?php | |
function getAllKeys(\Memcached $mc): array | |
{ | |
$allKeys = []; | |
foreach ($mc->getServerList() as $id => $server) { | |
$sock = fsockopen($server['host'], $server['port'], $errno, $errstr, 1); |
View Dockerfile
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
FROM golang:1.14 AS builder | |
WORKDIR /go/src/app | |
COPY . . | |
RUN sh build.sh | |
FROM alpine:latest | |
RUN apk --no-cache add ca-certificates |
View CzechBankAccountCheck.js
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 checkBankAccountNumber(account) { | |
var matches = /^(([0-9]{0,6})-)?([0-9]{1,10})\/([0-9]{1,6})$/.exec(account); | |
if (!matches) { | |
return false; | |
} | |
return checkDigit11(matches[2]) && checkDigit11(matches[3]); | |
} |
View example.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
</head> | |
<body> | |
<style type="text/css" media="all"> |
View Debug smarty with firebug
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
{* Smarty *} | |
{capture name='_smarty_debug' assign=debug_output} | |
<script type="text/javascript"> | |
// <![CDATA[ | |
window.smarty ={}; | |
{if $assigned_vars != null} | |
{foreach $assigned_vars as $vars} | |
window.smarty['{$vars@key|escape:'javascript'}'] = {$vars|@json_encode nofilter}; | |
{/foreach} |