Skip to content

Instantly share code, notes, and snippets.

View buryat's full-sized avatar
👉
w̦̬ͦ̄̉̂ͮ͜͟ȍ̵͓͚̗́ͪ̚̚͞ŗ͇ͭ̊̆ķ͊ͫͬ̋̐̔̀҉̙͍̦i͕͓̳̞ͭͫ̂ņ̷͚̪̮̤̹͖̃̀̓͆ͥ͑͑̚g̭̺̲͕̺̦̥̫̒̚͢͢

Vadim S buryat

👉
w̦̬ͦ̄̉̂ͮ͜͟ȍ̵͓͚̗́ͪ̚̚͞ŗ͇ͭ̊̆ķ͊ͫͬ̋̐̔̀҉̙͍̦i͕͓̳̞ͭͫ̂ņ̷͚̪̮̤̹͖̃̀̓͆ͥ͑͑̚g̭̺̲͕̺̦̥̫̒̚͢͢
View GitHub Profile
@buryat
buryat / vtb_csv2qif.js
Created December 26, 2011 09:25
VTB24 csv to QIF converter
/*
* @description VTB24 csv to QIF converter
* @usage cat vtb.csv | node vtb_csv2qif.js > vtb.qif
* @url http://en.wikipedia.org/wiki/Quicken_Interchange_Format
*/
var fs = require('fs');
var vtb_csv = fs.readFileSync('/dev/stdin').toString(),
exchange_rate = 31.2575;
var vtb_qif = vtb_csv.replace(
@buryat
buryat / ring_bench.erl
Created January 6, 2012 12:47
erlang message pass through processes ring
-module(ring_bench).
-export([start/1]).
%% start([N, M])
%% Create N processes into ring and sned message round the ring M times
start([A, B]) ->
N = list_to_integer(atom_to_list(A)),
M = list_to_integer(atom_to_list(B)),
Self = self(),
@buryat
buryat / gist:3825405
Created October 3, 2012 06:29
eclipse.ini for Scala plugin
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
--launcher.XXMaxPermSize
384m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-server
-XX:PermSize=256m
@buryat
buryat / gist:3841291
Created October 5, 2012 17:50
php madskillz
$a = array(…);
$b = 1;
foreach ($a as $v) {
if ($b) {
$a = array();
$b = 0;
}
$a[] = f($v);
}
unset($b);
@buryat
buryat / gist:4382108
Created December 26, 2012 18:36
Bash command status
PS1="\$(if [ \${?##0} ]; then echo '\e[1;31;40m\]✘\e[0m\]'; else echo '\e[1;32;40m\]✔\e[0m\]'; fi) …"
10x m1.large Amazon EC2 instances
4 buckets, ~80M items.
service couchbase-server stop/start on a node and rebalancing cluster then.
valgrind --leak-check=full --tool=memcheck moxi …
==16448==
==16448== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 25 from 1)
==16448== malloc/free: in use at exit: 176,736,618 bytes in 11,245 blocks.
16/05/27 16:38:51 INFO GenerateOrdering: Code generated in 67.482205 ms
16/05/27 16:38:51 INFO GenerateUnsafeProjection: Code generated in 13.754114 ms
16/05/27 16:39:05 INFO UnsafeExternalSorter: Thread 96 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:05 INFO UnsafeExternalSorter: Thread 110 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:05 INFO UnsafeExternalSorter: Thread 95 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:05 INFO UnsafeExternalSorter: Thread 93 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:05 INFO UnsafeExternalSorter: Thread 92 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:06 INFO UnsafeExternalSorter: Thread 90 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:06 INFO UnsafeExternalSorter: Thread 94 spilling sort data of 2.1 GB to disk (0 time so far)
16/05/27 16:39:06 INFO UnsafeExternalSorter: Thread 91 spilling sort data of 2.1 GB to disk (0 time so far)
Index: app/org/apache/spark/deploy/history/SparkFSFetcher.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/org/apache/spark/deploy/history/SparkFSFetcher.scala (revision c3cb9efddc15cb9b9af3b510d6dad3e65652ce38)
+++ app/org/apache/spark/deploy/history/SparkFSFetcher.scala (revision )
@@ -138,7 +138,7 @@
null
}
object TestReturn {
def t(n: Int): Boolean = {
(1 to n).map(x => {
if (x > 5) return true
false
}).exists(_ == true)
}
}
object TestReturn2 {
def t(n: Int): Boolean = {
@buryat
buryat / gist:0f286fed73acda016762b1ff28b93f4e
Created November 27, 2019 18:49
7238.native.thread.dump
Attaching to process ID 7238, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.232-b09
Deadlock Detection:
No deadlocks found.
----------------- 7239 -----------------
0x00007f480f8cc528 __pthread_cond_timedwait + 0x128