Skip to content

Instantly share code, notes, and snippets.

Working from home

Alex Siman siman

Working from home
Block or report user

Report or block siman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IgnoreIfBusyTyped.scala
trait IgnoreIfBusyCmd
abstract class IgnoreIfBusyTyped[C <: IgnoreIfBusyCmd](implicit m: Manifest[C]) extends Actor with ActorLogging{
import context.{become, unbecome}
import context.system
class Completed {
override def toString = "Completed"
View IgnoreIfBusyTyped.scala
abstract class IgnoreIfBusyTyped[C](implicit m: Manifest[C])
extends Actor with ActorLogging {
import context.{become, unbecome}
import context.system
class Completed {
override def toString = "Completed"
siman / VipTreeApp.scala
Last active Dec 23, 2015
Filter VIP nodes of a tree. (non tail-recursive yet)
View VipTreeApp.scala
package example
import collection.mutable.ArrayBuffer
import collection.mutable
import annotation.tailrec
* @author Alex Siman <>
* Date: 2013-09-12
siman / gist:7458258
Created Nov 13, 2013
Postgres DAO with Slick (Scala)
View gist:7458258
package models
import scala.slick.driver.PostgresDriver.simple._
import Database.threadLocalSession
import scala.slick.jdbc.{GetResult, StaticQuery => Q}
trait AbstractDao[Id, E] {
def countAll: Int
siman /
Last active Nov 17, 2015 — forked from osipov/gist:c2a34884a647c29765ed
Install Scala 2.11.7 and SBT 0.13.9 using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget
sudo dpkg -i scala-2.11.7.deb
sudo apt-get update
sudo apt-get install scala
echo "deb /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp:// --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
View startup-matrix-sample.json
"brand": "Twitch",
"site": "",
"logo": "",
"market": "Gaming",
"tactic": "Build a UGC community"
"brand": "Airbnb",
"site": "",
siman / jquery-in-browser-console.js
Created Apr 20, 2017
Inject jQuery into browser console
View jquery-in-browser-console.js
var script = document.createElement("script");
script.setAttribute("src", "//");
script.addEventListener('load', function() {
var script = document.createElement("script");
}, false);
View Blockswap.sol
pragma solidity ^0.4.8;
// ----------------------------------------------------------------------------------------------
// A collaboration between Incent and Bok :)
// Enjoy. (c) Incent Loyalty Pty Ltd, and Bok Consulting Pty Ltd 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
//config contract
contract TokenConfig {
siman / litecoin-tx-real-sample-1-input.js
Last active Oct 26, 2017
JSON of Litecoin tx 82e7738a7e315f4cdd674d830119bebab4016d1497cf5cc47971bdb75d3d3906
View litecoin-tx-real-sample-1-input.js
// Run from console (requires Litecoin full node with "txindex=1" in litecoin.conf):
// $ litecoin/bin/litecoin-cli getrawtransaction 82e7738a7e315f4cdd674d830119bebab4016d1497cf5cc47971bdb75d3d3906 1
// Where we call method "getrawtransaction" with 2 arguments:
// txid: 82e7738a7e315f4cdd674d830119bebab4016d1497cf5cc47971bdb75d3d3906
// 1 - to decode raw tx
var txJson =
"hex": "0100000001679daba376c12e3f6ed7cd72e19d4af98b00d0ad29d66965ea4e39a2a7e0d66e010000006c493046022100b9211248e7741851e583eeb74deba169689f02fa0282c85493b4a018edb34800022100939501466fbb41f7afa0e80c06a0e01443372d5d5f38da0a5faa482aeb1f2e2b0121023d50a25ce5ab515c2b0920ce29bf0facd17ed7d914f7ef6859b0bd91b6c5580effffffff0207d42bb9090000001976a914ac79e1772f994c04dc4bb8dabab1db69625ce64188ac0ba61c0c000000001976a91494139449bb5a7227f238dfa9d777260cf3a7bd8c88ac00000000",
You can’t perform that action at this time.