Skip to content

Instantly share code, notes, and snippets.

import "owned";
contract DepositTracker is owned
{
event Deposit(address indexed from, uint value);
event Transfer(address indexed to, uint value);
function () {
Deposit(msg.sender, msg.value);
}
0x2373012E0add11D2AeBaB8DA2E84342e0F9215F0

Keybase proof

I hereby claim:

  • I am mirzap on github.
  • I am mirzap (https://keybase.io/mirzap) on keybase.
  • I have a public key ASBGXSoih3f05B2Qy3aKWGYnA2A1-jQSkOQ7x7wDkICIqAo

To claim this, I am signing this object:

@mirzap
mirzap / README.md
Created October 13, 2016 07:06 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@mirzap
mirzap / Install-php7.md
Created August 30, 2016 13:59 — forked from hollodotme/Install-php7.md
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@mirzap
mirzap / postgresql_jsonb_crud.sql
Created April 5, 2016 14:23 — forked from inindev/postgresql_jsonb_crud.sql
Simple PostgreSQL 9.4 functions to manipulate jsonb objects adapted from Matheus de Oliveira's json_manipulator.sql. https://gist.github.com/matheusoliveira/9488951 (Note: performance is not a concern for those functions)
/*
* derivative work of Matheus de Oliveira's json_manipulator.sql
* https://gist.github.com/matheusoliveira/9488951
*
* adapted to support postgresql 9.4 jsonb type
* no warranties or guarantees of any kind are implied or offered
*
* license is as Matheus conferred it on 4/9/2015:
* matheusoliveira commented on Apr 9
* @hannes-landeholm, I'd like to take credit if you share them
@mirzap
mirzap / AuthenticateController.php
Created March 31, 2016 20:28 — forked from iolson/AuthenticateController.php
SentinelAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentinel
<?php namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
class AuthenticateController extends Controller
{
@mirzap
mirzap / ArraySplitter.php
Created December 25, 2015 16:05 — forked from fimak/ArraySplitter.php
Test job - Split Array
<?php
class ArraySplitter
{
public $x; //the X
public $a; //array
public $n; //count of all elements
public $k; //index of searching
public $left; //count of $x in left part
public $right; //count of !$x in right part
@mirzap
mirzap / audit_mixin.py
Created December 21, 2015 23:05 — forked from techniq/audit_mixin.py
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)