Skip to content

Instantly share code, notes, and snippets.

View myzone's full-sized avatar

Vyacheslav Goldenshteyn myzone

View GitHub Profile
@myzone
myzone / My Raspberry Pi fail
Last active December 14, 2015 17:28
Don't ever use default root password, if you're using ssh, which is available from internet.
Login history:
root pts/0 Fri Mar 8 21:00 - 21:00 (00:00) wallpapereditor.viohost.de
root pts/0 Fri Mar 8 17:54 - 18:00 (00:05) wallpapereditor.viohost.de
root pts/1 Fri Mar 8 00:07 - 00:10 (00:03) 31-210-110-205.turkrdns.com
History:
642 _screen
643 um
644 pt-get
645 free
javascript: $(".nav, #queue_title").css("display", "none"); // hide navigation-bar
javascript: $(".nav, #queue_title").css("display", "block"); // show navigation-bar
@myzone
myzone / _stdout
Last active December 29, 2015 14:49
JVM Crash
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb6ec66da, pid=16590, tid=468130624
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b116) (build 1.8.0-ea-b116)
# Java VM: Java HotSpot(TM) Server VM (25.0-b58 mixed mode linux-x86 )
# Problematic frame:
# V [libjvm.so+0x68c6da] Method::bci_from(unsigned char*) const+0xa
#
@myzone
myzone / FibTest.java
Created December 3, 2013 12:23
Declarative java :)
package com.myzone.nopebook;
import java.util.function.Function;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
/**
* Created by myzone on 12/3/13.
*/
@myzone
myzone / bullshit
Last active January 1, 2016 02:49
rear tyre is tired.
but front is ok.
internet connection is wired.
and it makes our own day.
the time will stuck in traffic.
once our connections go down.
you just can be provided by graphic.
but in lie legenda will drown.
#ifndef _CPLUSPLUS_H
#define _CPLUSPLUS_H
/*
This is applicable if using virtual inheritance.
*/
__extension__ typedef int __guard __attribute__((mode (__DI__)));
extern "C" int __cxa_guard_acquire(__guard *);
extern "C" void __cxa_guard_release (__guard *);
@myzone
myzone / myfile.cpp
Last active August 29, 2015 14:14 — forked from anonymous/myfile.cpp
call __main
movl $1, -4(%rbp)
jmp .L2
.L3:
sall -4(%rbp)
movl -4(%rbp), %eax
movl %eax, %edx
movq .refptr._ZSt4cout(%rip), %rcx
call _ZNSolsEi
leaq .LC0(%rip), %rdx
@myzone
myzone / so-cool
Last active August 29, 2015 14:17
diff failure
<tag>
<inner_tag>
<awsome target="me"/>
</inner_tag>
<inner_tag>
<awsome target="smo1"/>
<awsome target="smo2"/>
</inner_tag>
@myzone
myzone / Lang comparison.kt
Last active February 20, 2016 23:55
Lang comparison
ECMA Script 6:
const applier = (rules, reactions) => {
const apply = (state, events) => {
return R.reduce((state, event) => {
const reaction = reactions(state, event);
const next = rules(state, event);
return apply(next, reaction);
}, state, events);
@myzone
myzone / code.es6
Last active February 23, 2016 18:10
const applier = (rules, reactions) => {
const apply = (state, events) => {
return R.reduce((state, event) => {
const reaction = reactions(state, event);
const next = rules(state, event);
return apply(next, reaction);
}, state, events);
};