Skip to content

Instantly share code, notes, and snippets.

View kuraga's full-sized avatar

Alexander Kurakin kuraga

View GitHub Profile
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\t\3;\2\"\0\200\4\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource is temporary unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 2, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 2, 0) = 1 ([{fd=3, revents=POLLIN}])
poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\t\0;\2\"\0\200\4\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource is temporar
Nov 7 11:03:46 node-calculate2 NetworkManager[14528]: <info> [1541577826.0960] audit: op="connection-activate" uuid="45b4679e-3fde-4c71-8c6c-110ba7efd3b0" name="EarthVPN (L2TP+IPsec)" pid=5271 uid=1000 result="success"
Nov 7 11:03:46 node-calculate2 NetworkManager[14528]: <info> [1541577826.1059] vpn-connection[0x556c9ed0a120,45b4679e-3fde-4c71-8c6c-110ba7efd3b0,"EarthVPN (L2TP+IPsec)",0]: Started the VPN service, PID 14743
Nov 7 11:03:46 node-calculate2 NetworkManager[14528]: <info> [1541577826.1166] vpn-connection[0x556c9ed0a120,45b4679e-3fde-4c71-8c6c-110ba7efd3b0,"EarthVPN (L2TP+IPsec)",0]: Saw the service appear; activating connection
Nov 7 11:03:46 node-calculate2 NetworkManager[14528]: <info> [1541577826.1911] vpn-connection[0x556c9ed0a120,45b4679e-3fde-4c71-8c6c-110ba7efd3b0,"EarthVPN (L2TP+IPsec)",0]: VPN connection: (ConnectInteractive) reply received
Nov 7 11:03:48 node-calculate2 ipsec_starter[14759]: Starting strongSwan 5.7.1 IPsec [starter]...
Nov 7 11:03:48 node-calculate2 ipsec_start
# -*- coding: utf-8 -*-
import vk_api
from threading import Thread
import time
def do(vk, code):
a = time.time()
vk.execute(code=code)
@kuraga
kuraga / test-concurrent-call.js
Created January 18, 2016 19:48
Test concurrent call of the same function
var longActionCalled = 0,
firstlongActionCallFinished = false,
secondRedrawRequested = false;
function longAction() {
longActionCalled++;
switch (longActionCalled) {
case 1:
render(); // rafs longAction call
@kuraga
kuraga / oauth2_password.rb
Created May 15, 2015 11:39
Omniauth OAuth2 Password strategy
require 'oauth2'
require 'omniauth'
require 'securerandom'
require 'socket' # for SocketError
require 'timeout' # for Timeout::Error
require 'faraday' # for Faraday::Error::TimeoutError and Faraday::Error::ConnectionFailed
require 'multi_json' # for MultiJson::DecodeError
module OmniAuth
module Strategies
diff --git a/wp-content/plugins/custom-content-shortcode/includes/content.php b/wp-content/plugins/custom-content-shortcode/includes/content.php
index d707937..5b0b38a 100644
--- a/wp-content/plugins/custom-content-shortcode/includes/content.php
+++ b/wp-content/plugins/custom-content-shortcode/includes/content.php
@@ -971,7 +971,7 @@ class CCS_Content {
$image_fields = array('image','image-full','image-link','image-link-self',
'thumbnail','thumbnail-link','thumbnail-link-self','gallery');
- if ($field=='thumbnail')
+ if ($field=='thumbnail' && $parameters['size']==null)
@kuraga
kuraga / custom-content-shortcode-wck-image.patch
Created October 17, 2014 19:02
custom-content-shortcode-wck-image.patch
From: Kurakin Alexander <kuraga333@mail.ru>
Date: Thu, 16 Oct 2014 18:25:04 +0400
Subject: [PATCH] Add shortcode for WCK images
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
includes/wck.php | 56 ++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
pulled https://github.com/TimSchlechter/bootstrap-tagsinput/pull/146 https://github.com/janvt/bootstrap-tagsinput master
badidea https://github.com/TimSchlechter/bootstrap-tagsinput/pull/145
pulled https://github.com/TimSchlechter/bootstrap-tagsinput/pull/144 https://github.com/caulfield/bootstrap-tagsinput trimmed-items-option
pulled https://github.com/TimSchlechter/bootstrap-tagsinput/pull/143 https://github.com/nshulipa/bootstrap-tagsinput patch-1
badidea https://github.com/TimSchlechter/bootstrap-tagsinput/pull/135
pulled https://github.com/TimSchlechter/bootstrap-tagsinput/pull/128 https://github.com/impied/bootstrap-tagsinput tagClassBug
pulled https://github.com/TimSchlechter/bootstrap-tagsinput/pull/127 https://github.com/BenjaminPaap/bootstrap-tagsinput patch-1
complicated https://github.com/TimSchlechter/bootstrap-tagsinput/pull/126
complicated https://github.com/TimSchlechter/bootstrap-tagsinput/pull/124
badidea https://github.com/TimSchlechter/bootstrap-tagsinput/pull/117