Skip to content

Instantly share code, notes, and snippets.

View alopatindev's full-sized avatar

Alexander Lopatin alopatindev

View GitHub Profile
@alopatindev
alopatindev / JobsSelector.scala
Last active December 25, 2016 21:24
Domain selection tool based on interest in technologies the domain relates to
// Developed by Alexander Lopatin (https://alopatindev.github.io)
// See https://alopatindev.github.io/2016/04/30/career-shift-time/
// This program is licensed under the terms of WTFPL
object JobsSelector extends App {
import scala.language.postfixOps
import scala.util.Try
val backendTechs: Set[String] = Set("nodejs", "Scala", "C++", "C", "MySQL", "PostgreSQL", "MongoDB", "Redis", "OrientDB", "Databases", "Play Framework", "JavaScript", "GNU/Linux", "Free Software", "Java", "nginx", "Network Stack", "JVM")
This file has been truncated, but you can view the full file.
./support/android/apk/libs/armeabi/libmain.so: file format elf32-littlearm
DYNAMIC SYMBOL TABLE:
00000000 DF *UND* 00000000 __cxa_finalize
00000000 DF *UND* 00000000 __cxa_atexit
021ddfa4 g DF .text 00000024 _Unwind_Resume
028228ac g DO .data.rel.ro 00000008 _ZN101_$LT$compositor..IOCompositor$LT$Window$GT$$u20$as$u20$compositor_thread..CompositorEventListener$GT$20title_for_main_frame15__STATIC_FMTSTR17h1f3abecc80102320E
02822898 g DO .data.rel.ro 00000014 _ZN101_$LT$compositor..IOCompositor$LT$Window$GT$$u20$as$u20$compositor_thread..CompositorEventListener$GT$20title_for_main_frame4_LOC17h35f08431fe492b2bE
00ab5bc8 g DF .text 000015c4 _ZN10env_logger4init17h49b0d5078ddf2a01E
This file has been truncated, but you can view the full file.
./support/android/apk/libs/armeabi/libmain.so: file format elf32-littlearm
DYNAMIC SYMBOL TABLE:
00000000 DF *UND* 00000000 __cxa_finalize
00000000 DF *UND* 00000000 __cxa_atexit
00000000 DF *UND* 00000000 ALooper_pollAll
03dfc930 g DF .text 00000024 _Unwind_Resume
04674618 g DO .data.rel.ro 00000008 _ZN101_$LT$compositor..IOCompositor$LT$Window$GT$$u20$as$u20$compositor_thread..CompositorEventListener$GT$20title_for_main_frame15__STATIC_FMTSTR17h299a6ec8b3595ebaE
04674604 g DO .data.rel.ro 00000014 _ZN101_$LT$compositor..IOCompositor$LT$Window$GT$$u20$as$u20$compositor_thread..CompositorEventListener$GT$20title_for_main_frame4_LOC17hac2ebc7a1797d0c1E
@alopatindev
alopatindev / android_emulator.sh
Last active April 14, 2016 02:47
android_emulator.sh
#!/bin/bash
TARGET='android-18'
NAME='android'
RECREATE=1
APATH=$ANDROID_SDK/tools/android
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ANDROID_SDK}/tools/lib64"
[ ${RECREATE} = 1 ] && (
@alopatindev
alopatindev / chromium-anon-proxy.sh
Created March 23, 2016 11:52
chromium-anon-proxy.sh
#!/bin/bash
CDIR="/tmp/chromium-cache-anon-proxy-${USER}"
DDIR="${HOME}/.config/chromium-anon-proxy"
mkdir -p ${CDIR} ${DDIR}
chromium --incognito --proxy-server=socks5://127.0.0.1:9050 --disk-cache-dir=${CDIR} --user-data-dir=${DDIR} $@
@alopatindev
alopatindev / array_wut.py
Created March 20, 2016 15:43
array_wut.py
class A:
x = 1
a = A()
b = A()
a.x += 1
print (a.x, b.x) # 1 2
class B:
x = []
@alopatindev
alopatindev / smart_pointers_tree.cpp
Last active March 17, 2016 19:35
shared_ptr to this and other magic
#include <iostream>
#include <memory>
#include <stack>
#include <string>
#include <utility>
#include <vector>
template <typename T>
class Node : public std::enable_shared_from_this<Node<T>> {
const T data;
@alopatindev
alopatindev / caesar.rb
Last active March 15, 2016 17:36
caesar.rb
def is_letter (x)
return x.ord >= "a".ord && x.ord <= "z".ord
end
def encrypt (text, key, n, offset)
encrypted_text = ""
text.each_char do |x|
if is_letter(x)
code = (x.ord + key - offset) % n + offset
encrypted_text += code.chr
// find common area of given list of rectangles
object CommonAreaRects extends App {
type Coord = (Int, Int)
class Rect(val bottomLeft: Coord, val topRight: Coord) {
override def toString: String = s"Rect($bottomLeft, $topRight)"
def ==(other: Rect): Boolean = bottomLeft == other.bottomLeft && topRight == other.topRight
@alopatindev
alopatindev / LongestAirPath.scala
Last active February 23, 2016 13:25
LongestAirPath.scala
// https://leetcode.com/problems/reconstruct-itinerary/
// Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the (longest) itinerary in order.
import scala.collection.immutable.{HashMap, HashSet}
object LongestAirPath extends App {
type Ticket = (String, String)
type TicketsFromMap = HashMap[String, List[String]]