Skip to content

Instantly share code, notes, and snippets.

View dworznik's full-sized avatar

Patryk Dwórznik dworznik

  • Seoul, South Korea
  • 04:16 (UTC +09:00)
View GitHub Profile
pragma solidity ^0.4.13;
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
0x8386b028d316001f0c4f06885695862ed5d4deb4
@dworznik
dworznik / veritaseum.md
Last active May 17, 2017 18:55
Tech position at Veritaseum, Inc.

Tech position

Description

Veritaseum, Inc. is seeking full stack Solidity developers. We are flexible as to formalizing relationships, but contractors should be prepared for an open-ended engagement. You are expected to have:

  • expertise in Solidity development and best practices
  • expertise in JavaScript development (both inside the browser and out) and best practices
  • expertise in at least one other commonly used programming language (Python preferred)
### Keybase proof
I hereby claim:
* I am dworznik on github.
* I am dworznik (https://keybase.io/dworznik) on keybase.
* I have a public key whose fingerprint is 51C1 BA1A 66D2 E1F8 2D80 9B3F EAD1 8F87 CBA6 43A8
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dworznik on github.
  • I am dworznik (https://keybase.io/dworznik) on keybase.
  • I have a public key whose fingerprint is 3FC8 969D 3B69 E1DE 47A7 9FD6 91E0 E6EF F796 5496

To claim this, I am signing this object:

@dworznik
dworznik / ClassLoadContext.java
Created April 1, 2014 15:47
The following class serves as a global decision point for acquiring the best classloader to use at any given time in the application.
package com.vladium.utils;
// ----------------------------------------------------------------------------
/**
* Information context for {@link IClassLoadStrategy#getClassLoader(ClassLoadContext)}.
*
* @author (C) <a href="http://www.javaworld.com/columns/jw-qna-index.shtml">Vlad Roubtsov</a>, 2003
*/
@dworznik
dworznik / embed.py
Created June 11, 2013 21:12
Embeds lyrics in ID3 tag
import mutagen.mp3
import mutagen.id3
import sys
def write_id3(file, lyrics):
tag = mutagen.mp3.MP3(file)
atom = u"USLT::'eng'"
if lyrics is None:
if atom in tag: del tag[atom]
else:
@dworznik
dworznik / apns_sender.rb
Created November 12, 2011 13:25
Apple Push Notification Service Sender
#!/usr/bin/env ruby -wKU
# USAGE
#
# apns_cert = './apns-dev.pem'
# device_token = 'XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX'
#
# APNSender.open(apns_cert, :sandbox) { |s| s.send(device_token, "Alert text") }
#
# sender = APNSender.open(apns_cert, :sandbox)
@dworznik
dworznik / each.js
Created July 14, 2011 20:51
Array.each()
Array.prototype.each = function(fun) {
if(typeof(fun) != "function") return;
for(var i = 0; i < this.length; i++) {
fun(this[i]);
}
return this;
}
@dworznik
dworznik / euler001.clj
Created February 7, 2011 00:42
Find the sum of all the multiples of 3 or 5 below 1000
(reduce + (filter #(or (= 0 (rem % 3)) (= 0 (rem % 5))) (range 1 1000)))