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
View GitHub Profile
# 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 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 [email protected]: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

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:

# frozen_string_literal: true
require 'octokit'
def configure
Octokit.configure do |c|
c.auto_paginate = true
end
end

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