Skip to content

Instantly share code, notes, and snippets.

🌇
Working remotely @ Moscow, Russia

Artem Kirienko artkirienko

🌇
Working remotely @ Moscow, Russia
View GitHub Profile
View coderpad.rb
# coderpad test
# https://coderpad.io/
# click Try Sandbox
# choose Ruby
# paste:
# Determine if a word or phrase is an isogram.
# An isogram (also known as a "nonpattern word") is a word or phrase
# without a repeating letter, however spaces and hyphens are allowed
@artkirienko
artkirienko / gist:87ca671de79d0b05eebbf276bc4af9da
Created Jun 23, 2020 — forked from ryanlecompte/gist:1420133
Alternative to modifying Proc directly
View gist:87ca671de79d0b05eebbf276bc4af9da
# 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)
View migrate_repo.sh
# 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 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
View gist:dd20076b54e003aab3ac17725dacdf54
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 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
View dante_setup.sh
### 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 Sep 16, 2019 — forked from cheungnj/script.sh
Convert asciidoc to Github Flavored Markdown
View script.sh
# 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
View keybase.md

Keybase proof

I hereby claim:

  • I am artkirienko on github.
  • I am artkirienko (https://keybase.io/artkirienko) on keybase.
  • I have a public key ASDq3RvC1_UrisZ9ycm5ltAuPTQbUkDkRgWc1jwe0lmTJAo

To claim this, I am signing this object:

View whos_not_following.rb
# frozen_string_literal: true
require 'octokit'
def configure
Octokit.configure do |c|
c.auto_paginate = true
end
end
View macbook-pro-2011-defective-gpu-fix-v2-better-ux.md

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

View macbook-pro-2011-defective-gpu-fix-v2.md
You can’t perform that action at this time.