Skip to content

Instantly share code, notes, and snippets.

View plashchynski's full-sized avatar
🎯
Focusing

Dzmitry Plashchynski plashchynski

🎯
Focusing
View GitHub Profile
@plashchynski
plashchynski / settings.json
Last active March 4, 2017 13:19
VC Code User settings $HOME/Library/Application Support/Code/User/settings.json
{
"window.zoomLevel": 0,
"workbench.colorTheme": "Visual Studio Light",
"editor.tabSize": 2
}
@plashchynski
plashchynski / convert_GCS_backup_to_CSV.py
Created June 12, 2016 00:00
Convert google cloud store backup to CSV
import sys
import csv
import codecs
sys.path.append('/usr/local/google_appengine')
from google.appengine.api.files import records
from google.appengine.datastore import entity_pb
from google.appengine.api import datastore
encoder = codecs.getincrementalencoder("utf-8")()

Keybase proof

I hereby claim:

  • I am plashchynski on github.
  • I am plashchynski (https://keybase.io/plashchynski) on keybase.
  • I have a public key whose fingerprint is 4419 EECA 7D19 B3B0 28C9 909E CB2C 2D65 75A8 B69F

To claim this, I am signing this object:

@plashchynski
plashchynski / google_play_purchase_verification.rb
Last active August 29, 2015 14:16
Android Google Play In-App purchases verification in Ruby
module Android
def self.verify_purchase(receipt_data, signature)
android_inapp_public_key = Rails.application.secrets[:android_inapp_public_key]
public_key = OpenSSL::PKey::RSA.new(Base64.decode64(android_inapp_public_key))
unless public_key.verify(OpenSSL::Digest::SHA1.new, Base64.decode64(signature), receipt_data)
raise "Wrong Android payment"
end
end
end
@plashchynski
plashchynski / rust_compilation_on_mountain_lion.txt
Created February 22, 2015 02:10
Rust make check error on Mountain Lion
This file has been truncated, but you can view the full file.
Started by upstream project "Homebrew Pull Requests" build number 21724
originally caused by:
GitHub pull request #37038 of commit 112853edbd74f026142fbfc70f5e1b1cf4a08186 automatically merged.
[EnvInject] - Loading node environment variables.
Building remotely on mountain_lion in workspace /Users/brew/Jenkins/workspace/Homebrew Pull Requests/version/mountain_lion
> /Applications/Xcode.app/Contents/Developer/usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /Applications/Xcode.app/Contents/Developer/usr/bin/git config remote.origin.url https://github.com/Homebrew/homebrew.git # timeout=10
Fetching upstream changes from https://github.com/Homebrew/homebrew.git
> /Applications/Xcode.app/Contents/Developer/usr/bin/git --version # timeout=10
@plashchynski
plashchynski / rust_compilation_on_mavericks.txt
Created February 22, 2015 02:08
Rust make check error on Mavericks
This file has been truncated, but you can view the full file.
Started by upstream project "Homebrew Pull Requests" build number 21724
originally caused by:
GitHub pull request #37038 of commit 112853edbd74f026142fbfc70f5e1b1cf4a08186 automatically merged.
[EnvInject] - Loading node environment variables.
Building remotely on mavericks in workspace /Users/brew/Jenkins/workspace/Homebrew Pull Requests/version/mavericks
> /Applications/Xcode.app/Contents/Developer/usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /Applications/Xcode.app/Contents/Developer/usr/bin/git config remote.origin.url https://github.com/Homebrew/homebrew.git # timeout=10
Fetching upstream changes from https://github.com/Homebrew/homebrew.git
> /Applications/Xcode.app/Contents/Developer/usr/bin/git --version # timeout=10
@plashchynski
plashchynski / sublime.cfg
Last active August 29, 2015 14:05
sublime user config
{
"color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme",
"font_face": "Menlo-Regular",
"font_size": 14.0,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true
@plashchynski
plashchynski / pwgen.rb
Created June 7, 2012 23:21
strong password generator
#!/usr/bin/env ruby
require 'optparse'
options = { :minsize => 8 }
OptionParser.new do |opts|
opts.banner = "Usage: #{__FILE__} [options]"