Skip to content

Instantly share code, notes, and snippets.

View artkirienko's full-sized avatar
🌇
Working remotely @ Vancouver, Canada

Artem Kirienko artkirienko

🌇
Working remotely @ Vancouver, Canada
  • https://pressreader.com
  • Vancouver, Canada
  • 19:22 (UTC -07:00)
  • LinkedIn in/artkirienko
View GitHub Profile
@artkirienko
artkirienko / gist:87ca671de79d0b05eebbf276bc4af9da
Created June 23, 2020 18:14 — forked from ryanlecompte/gist:1420133
Alternative to modifying Proc directly
# alternative to what is explained in the article Ruby Blocks as Dynamic Callbacks:
# http://www.mattsears.com/articles/2011/11/27/ruby-blocks-as-dynamic-callbacks
class Twitter
def tweet(msg, &block)
proxy = DSL[block]
publish(msg)
proxy.respond_with(:success)
rescue => e
proxy.respond_with(:failure, e.message)
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@artkirienko
artkirienko / gist:dd20076b54e003aab3ac17725dacdf54
Created May 6, 2020 15:18 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@artkirienko
artkirienko / dante_setup.sh
Created May 1, 2020 22:46 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@artkirienko
artkirienko / script.sh
Created September 16, 2019 21:12 — forked from cheungnj/script.sh
Convert asciidoc to Github Flavored Markdown
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor

Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process

Taken from StackExchange

Thanks to LangLangC

Improved thermal and power management

Open Terminal.app

@artkirienko
artkirienko / subtitle-extract.txt
Created November 28, 2017 10:47 — forked from bmaeser/subtitle-extract.txt
extract subtitles from *.mkv-files on osx
lines with $ are commands
### install mkvtoolnix:
$ brew install mkvtoolnix
### list content of the mkv-file:
$ mkvmerge -i mymoviefile.mkv
### what will give you:
require 'faraday'
require 'benchmark'
@conn = Faraday.new(url: 'https://www.google.com')
@threads = []
Benchmark.bm(14) do |x|
x.report('no-threads') do
8.times { @conn.get }
end
We had two distros of Oracle DB, seven forks of MySQL from different vendors,
five DVDs with MS SQL Server, a saltshaker half-full flash drive with PostgreSQL debs,
source code for a whole galaxy of FOSS databases... Including Redis, Memcached, MongoDB, Elasticsearch, and Neo4j.
Not that we needed all that for the workshop, but once you get locked into a serious data warehousing,
the tendency is to push it as far as you can. The only thing that really worried me was the SQLite.
There is nothing in the world more helpless and irresponsible and depraved than in-process embedded serverless databases,
and I knew we'd get into that rotten stuff pretty soon.