Skip to content

Instantly share code, notes, and snippets.

@lesichkovm
lesichkovm / main.py
Created July 30, 2023 15:00 — forked from juanpabloaj/main.py
looking for job using Linkedin API
import os
import sqlite3
from linkedin_api import Linkedin
import logging
def extract_id(urn):
return urn.split(":")[-1]
@lesichkovm
lesichkovm / wp-shortcodes.go
Created June 8, 2022 03:31 — forked from timsayshey/wp-shortcodes.go
Wordpress Shortcodes in Golang
package main
import (
"fmt"
"io/ioutil"
"net/http"
"regexp"
"strconv"
"strings"
)
@lesichkovm
lesichkovm / golang_job_queue.md
Created March 10, 2021 04:15 — forked from harlow/golang_job_queue.md
Job queues in Golang
@lesichkovm
lesichkovm / TestServer.php
Created September 16, 2019 05:38 — forked from mindplay-dk/TestServer.php
Minimal (copy and paste) unit testing
<?php
/**
* This class will launch the built-in server in PHP 5.4+ in the background
* and clean it up after use.
*/
class TestServer
{
/**
* @var resource PHP server process handle
@lesichkovm
lesichkovm / windows10_bashrc
Created November 2, 2018 02:34 — forked from iam1980/windows10_bashrc
.bashrc windows 10
LS_COLORS='rs=0:di=1;35:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*
@lesichkovm
lesichkovm / ffmpeg-cheatsheet.md
Created January 21, 2018 06:17 — forked from athiwatp/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
<?php
require_once __DIR__ . '/init.php';
main(); // Run task
function main() {
// 1. Get all products
$products = getProducts();
@lesichkovm
lesichkovm / jqh.js
Created November 5, 2017 07:22 — forked from ivanoats/jqh.js
Hyperscript for jQuery
// hyperscript for jQuery
// create nested HTML elements with a DSL
// used to create reusable, interactive HTML components
//
// based on the many implentations out there like
// https://github.com/dominictarr/hyperscript
// https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript
// and Elm https://github.com/evancz/elm-html
var $h = function(element, properties, content) {
var $component = $('<' + element + '>');
var Path = require('path');
var getRegCommand = function() {
var command = 'reg.exe';
if (process.env.SystemRoot) {
command = Path.join(process.env.SystemRoot, 'System32', command);
}
return command;
}
@lesichkovm
lesichkovm / README.md
Created January 29, 2017 04:37 — forked from dominikwilkowski/README.md
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with