Skip to content

Instantly share code, notes, and snippets.

using System;
public class PositiveOverflowException : Exception {}
public class NegativeOverflowException : Exception {}
// TODO:
// - increment
// - left shift
public static class BitwiseArithmetics {
private const int bitsNum = sizeof(int) * 8;

Keybase proof

I hereby claim:

  • I am ip on github.
  • I am perevezentsev (https://keybase.io/perevezentsev) on keybase.
  • I have a public key whose fingerprint is 197E 9525 CA3B 1951 6D88 822C 129F 7DE2 C3E1 762E

To claim this, I am signing this object:

@ip
ip / genericStreams.ts
Last active September 19, 2017 15:23
Generic TypeScript declarations for Node.js streams
/**
* Generic typings for Node.js streams
*/
import stream = require('stream')
export interface EventEmitter {
addListener(event: string, listener: (...args: any[]) => void): this
emit(event: string | symbol, ...args: any[]): boolean
on(event: string, listener: (...args: any[]) => void): this
once(event: string, listener: (...args: any[]) => void): this
/home/vanya/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_23_x86
sh: 1: glxinfo: not found
sh: 1: glxinfo: not found
emulator: WARNING: Host CPU is missing the following feature(s) required for x86 emulation: SSSE3
Hardware-accelerated emulation may not work properly!
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
@ip
ip / endless_tunnel_log.txt
Created April 27, 2016 17:01
ndk-samples/endless-tunnel crash log
04-27 19:57:38.133 8001-8001/com.google.example.games.tunnel E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.example.games.tunnel, PID: 8001
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.example.games.tunnel/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app-lib/com.google.example.games.tunnel-1/libgame.so
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$900(ActivityThread
➜ build git:(master) ✗ make doc_openscenegraph doc_openthreads
Scanning dependencies of target doc_openscenegraph
Warning: Tag `SYMBOL_CACHE_SIZE' at line 40 of file `/home/vanya/Documents/prog/third_party/OpenSceneGraph/build/doc/openscenegraph.doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `XML_SCHEMA' at line 201 of file `/home/vanya/Documents/prog/third_party/OpenSceneGraph/build/doc/openscenegraph.doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `XML_DTD' at line 202 of file `/home/vanya/Documents/prog/third_party/OpenSceneGraph/build/doc/openscenegraph.doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: doxygen no longer ships with the FreeSans font.
You may want to clear or ch
@ip
ip / android-studio.desktop
Created April 10, 2016 17:18
android-studio.desktop file for Dash (Ubuntu)
[Desktop Entry]
Version=1.0
Name=Android Studio
################ Change these paths accordingly ################
Exec=/home/vanya/Documents/bin/android-studio/bin/studio.sh
Path=/home/vanya/Documents/bin/android-studio/bin/
Icon=/home/vanya/Documents/bin/android-studio/bin/studio.png
Terminal=false
// This snippet for VK.com adds audio tracks from user page to the group.
// Insert your parameters and execute it multiple times (it copies "count" tracks at time)
// Insert your values here
var user_id=123;
var group_id=456;
// Max requests number per execution is 25
var count = 25-3;