Skip to content

Instantly share code, notes, and snippets.

@samm-git
samm-git / checkmujkaktus.pl
Created March 15, 2016 13:40
Check balance on CZ kaktus prepaid GSM card
#!/usr/bin/perl
use strict;
require LWP::UserAgent;
# username/password
my $username = 'example@example.com';
my $password = 'example';
binmode STDOUT, ":utf8"; # suppress UTF-8 warnings
@samm-git
samm-git / redistest.php
Last active May 12, 2016 21:09
redis health replication role check for the ELB
<?php
// redis test
$r = new Redis();
$r->connect('127.0.0.1', 6379, 2.5); // connect to redis with 2.5 sec timeout
if(!$r) {
header('HTTP/1.1 500 Internal Server Error');
echo "Error: connection failed\n";
exit(0);
}
Serial Status Invalidity Date Comment
0x425D4BC6E44FFB10040000000100000021190000 revoked Aug 20 07:11:02 2016 GMT CN=test, O=test
0x425D4BC6E44FFB10040000000100000020190000 revoked Aug 20 07:10:44 2016 GMT CN=test, O=test
0x425D4BC6E44FFB1004000000E30E00002B190000 unknown Aug 20 07:01:03 2016 GMT ???
0x425D4BC6E44FFB1004000000E30E00002A190000 unknown Aug 20 07:00:53 2016 GMT ???
0x425D4BC6E44FFB1004000000E20E000027190000 unknown Aug 20 07:00:16 2016 GMT CN = Рябошапка Р.Г. from Aug 18 21:00:00 2016 GMT
0x425D4BC6E44FFB1004000000E20E000026190000 unknown Aug 20 07:00:09 2016 GMT CN = Рябошапка Р.Г., from Aug 18 21:00:00 2016 GMT
{
"id": "0fbde858-01cd-441f-bba8-15fdb92fdc65",
"version": 5,
"is_last": 1,
"type": 1,
"user_declarant_id": 422,
"created_date": "2016-09-04T16:42:35.943256",
"lastmodified_date": "2016-09-04T16:42:35.943256",
"data_step_0": {
"data": {
# 320ms user time, 30ms system time, 29.00M rss, 2.36G vsz
# Current date: Thu Sep 15 16:07:08 2016
# Hostname: Administrators-MacBook-Pro.local
# Files: /usr/local/var/mysql/Administrators-MacBook-Pro-slow.log
# Overall: 428 total, 37 unique, 0 QPS, 0x concurrency ___________________
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 185ms 8us 6ms 432us 972us 418us 316us
# Lock time 43ms 0 807us 100us 194us 63us 84us
#define _GNU_SOURCE
#include <dirent.h> /* Defines DT_* constants */
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/syscall.h>
[
{
"id": "ff0c75ed-d82f-461e-a0b6-2b1d2605ce1b",
"created_date": "22.09.2016",
"lastmodified_date": "22.09.2016",
"data": {
"step_0": {
"declarationType": "1",
"declarationYear1": "2015"
},
bash-3.2$ jq . patch
[
{
"id": "ed1edfa1-2823-4df9-96ea-ec16eba40083",
"created_date": "19.08.2016",
"lastmodified_date": "19.08.2016",
"data": {
"step_0": {
"declarationType": "1",
"declarationYear1": "2015"
diff --git a/lib/Cm/Cache/Backend/Redis.php b/lib/Cm/Cache/Backend/Redis.php
index 34a0f13..ca408f8 100644
--- a/lib/Cm/Cache/Backend/Redis.php
+++ b/lib/Cm/Cache/Backend/Redis.php
@@ -237,6 +237,7 @@ class Cm_Cache_Backend_Redis extends Zend_Cache_Backend implements Zend_Cache_Ba
{
//@todo: remove cache prefix properly
$id = substr($id,4);
+ if ($id == "CONFIG_GLOBAL_LOCK") return false;
foreach ($this->_tmpCacheKeywords as $match) {
<?php
/*
==New BSD License==
Copyright (c) 2013, Colin Mollenhour
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: