Skip to content

Instantly share code, notes, and snippets.

View iworker's full-sized avatar
🍟
Life

Ivan Pomortsev iworker

🍟
Life
  • Yerevan, Armenia
  • 02:23 (UTC +04:00)
View GitHub Profile
@iworker
iworker / instruction.md
Last active June 24, 2023 00:23
Install & configure Kerio VPN Client for docker-machine (with xhyve driver) and TinyCoreLinux installed as virtual machine on macOS
  1. Logging into docker-machine: docker-machine ssh default
  2. Create temporary working directory and changing to: mkdir kerio && cd kerio
  3. Download latest DEB-package of Kerio VPN client: wget https://cdn.kerio.com/dwn/kerio-control-vpnclient-linux-amd64.deb
  4. Unpack the package using ar utility: ar -x kerio-control-vpnclient-linux-amd64.deb
  5. Unpack internal archives:
tar -xzvf control.tar.gz
tar -xJvf data.tar.xz
  1. Copy all the shared libraries
#!/bin/bash
cd ~/Projects/project
gource -1280x720 --title "Project" -s 0.1 --multi-sampling --hide mouse,filenames --highlight-all-users --dir-name-depth 2 --logo logo.svg --user-image-dir ~/Documents/avatars -o - -r 60 logs.txt | ffmpeg -y -r 60 -i - -vcodec ppm -vcodec libx264 -preset slow -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
<?php
namespace console\controllers;
use yii\console\Controller;
use common\models\TestModel;
class LeakController extends Controller
{
private function createModels($detach = true, $count = 10000)
<?php
namespace common\models;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
class TestModel extends ActiveRecord
{
public function behaviors()
{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "373",
"short_name" : "373",
"types" : [ "street_number" ]
},
{
@iworker
iworker / dunedin-stadium-small
Last active August 29, 2015 14:22
Dunedin-stadium-small
{
"formatted_address" : "373 Douglas Avenue, Dunedin, FL 34698, United States",
"geometry" : {
"location" : {
"lat" : 28.00351,
"lng" : -82.786822
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/stadium-71.png",
"id" : "bc141a4d688b00041af65be8593aac94085031fe",
BSON:
Running benchmark for...
bson
100000 times
Test completed!!
Encoding time: 0.69315004348755
Decoding time: 0.82649397850037
Total time: 1.5196440219879
<?php
$old = date_default_timezone_get();
date_default_timezone_set('UTC');
$time = time();
$startTime = strtotime('+1 minute ', $time);
$date = date('m/d/Y ', $time);
$start_date = date('h:i A ', $startTime);
$endTime = strtotime('+11 hour 59 minutes ', $startTime);
$end_date = date('h:i A ', $endTime);