Skip to content

Instantly share code, notes, and snippets.


Alex Zinchenko yumitsu

  • St. Petersburg, Russia
View GitHub Profile
View formula-example.rb
# This is a non-functional example formula to showcase all features and
# therefore, it's overly complex and dupes stuff just to comment on it.
# You may want to use `brew create` to start your own new formula!
# Documentation:
## Naming -- Every Homebrew formula is a class of the type `Formula`.
# Ruby classes have to start Upper case and dashes are not allowed.
# So we transform: `example-formula.rb` into `ExampleFormula`. Further,
# Homebrew does enforce that the name of the file and the class correspond.
# Check with `brew search` that the name is free.
yumitsu / # remake - 2020-07-06_15-16-07.txt
Created Jul 6, 2020
remake on macOS 10.13.6 - Homebrew build logs
View # remake - 2020-07-06_15-16-07.txt
Homebrew build logs for remake on macOS 10.13.6
Build date: 2020-07-06 15:16:07
yumitsu / digest.rb
Created Jan 21, 2018 — forked from jfcalvo/digest.rb
Hash of files an strings with Ruby using MD5 and SHA256
View digest.rb
require 'digest'
# Get SHA256 Hash of a file
puts Digest::SHA256.hexdigest "data.dat"
# Get MD5 Hash of a file
puts Digest::MD5.hexdigest "data.dat"
# Get MD5 Hash of a string
puts Digest::SHA256.hexdigest "Hello World"
# Get SHA256 Hash of a string using update
View sed cheatsheet
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
View gist:fde8f1ae6b732caa5e257f6dd5e083f3 /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/sunmscapi.jar (No such file or directory)
at Method)
at com.javadeobfuscator.deobfuscator.utils.Utils.loadBytes(
at com.javadeobfuscator.deobfuscator.utils.TransformerHelper.newVirtualMachine(
at com.javadeobfuscator.deobfuscator.transformers.stringer.v3_1.StringEncryptionTransformer.transform(
at com.javadeobfuscator.deobfuscator.Deobfuscator.runFromConfig(
at com.javadeobfuscator.deobfuscator.Deobfuscator.start(
View free-memory.rb
#!/usr/bin/env ruby
# encoding: utf-8
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel
# | |
def get_paged_memory_usage(match_string, paging=4096)
mvar = 3
if match_string.split(/[^\w]/).length > 1
mvar = 4
window.namespace = ->
args = arguments[0]
target = global || window
for subpackage, obj of args
target = target[subpackage] or= {}
args = obj
break unless typeof args is 'object'
Class = args
View mobile-device.js
// Tests:
var MobileDevice = {
init: function() {
var j, device, _this = this;
device = {
'mobile': _this.isMobileDevice(),
'mobileDimensions': _this.isDimsMatching(),
'webkit': _this.isWebKitDevice(),
'mobileSafari': _this.isMobileSafari(),
View Vagrantfile
Vagrant.configure(2) do |config|
config.vm.define "boot2docker" = "parallels/boot2docker"
config.vm.box_check_update = false
config.ssh.private_key_path = [
View angularjs-interceptor.js
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.