Skip to content

Instantly share code, notes, and snippets.

View aryondev's full-sized avatar
🏠
Working from home

aryondev

🏠
Working from home
View GitHub Profile
@aryondev
aryondev / dummy.json
Last active June 11, 2019 06:49
Performance of JSON and Oj
{"_id":"5cff4975604ff2d92c87ef4f","index":0,"guid":"21616874-fa73-4e0c-8adb-558286d7d21a","isActive":false,"balance":"$1,516.72","picture":"http://placehold.it/32x32","age":21,"eyeColor":"brown","name":"Sharron Hardin","gender":"female","company":"ZAPHIRE","email":"[email protected]","phone":"+1 (891) 482-2306","address":"887 Delmonico Place, Veguita, Maryland, 910","about":"Aliqua fugiat in officia qui et. Sunt do velit irure consectetur fugiat consectetur deserunt est in consequat esse. Consectetur eu commodo non labore exercitation proident ullamco elit eiusmod Lorem et ut.\r\n","registered":"2016-11-10T07:49:49 -04:00","latitude":-32.059792,"longitude":-2.236265,"tags":["nulla","fugiat","aliqua","mollit","magna","nostrud","proident"],"friends":[{"id":0,"name":"Mercer Vance"},{"id":1,"name":"Gates Hunt"},{"id":2,"name":"Holman Crawford"},{"id":3,"name":"Franco Carter"},{"id":4,"name":"Cortez Mills"},{"id":5,"name":"Duncan Bishop"},{"id":6,"name":"Warner Schroeder"},{"id":7,"name":"Ramsey Heath"},{"
@aryondev
aryondev / test.rb
Last active September 4, 2018 11:25
require 'json'
require 'bing_translator'
translator = BingTranslator.new('COGNITIVE_SUBSCRIPTION_KEY')
content = File.read('content.json')
json = JSON.parse(content)
parse_hash = lambda do |key, value|
if value.is_a?(Hash)
{ key => value.map { |k,v| parse_hash.call(k,v) } }.reduce({}, &:merge)
#!/bin/bash
curl http://apache-mirror.rbc.ru/pub/apache/zookeeper/zookeeper-3.4.12/zookeeper-3.4.12.tar.gz >> zookeeper.tar.gz
tar -xf zookeeper.tar.gz
curl http://apache-mirror.rbc.ru/pub/apache/kafka/1.1.0/kafka_2.12-1.1.0.tgz >> kafka.tgz
tar -xf kafka.tgz
rm zookeeper.tar.gz kafka.tgz
@aryondev
aryondev / spacemacs-keybindings
Created June 20, 2017 11:51 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@aryondev
aryondev / find_cyr.pl
Created April 5, 2017 12:01
Script for find files with cyrillic texts.
#!/usr/local/bin/perl
use File::Find;
use locale;
use utf8;
my $target_dir = "/path/to/dir";
chomp $target_dir;
my $dir;
my @files;