Skip to content

Instantly share code, notes, and snippets.

View paxer's full-sized avatar
💭
🤔

Pavel Kotlyar paxer

💭
🤔
View GitHub Profile
@paxer
paxer / ruby_and_scala
Last active August 29, 2015 14:14
Love Scala!
# Ruby
class Example
def initialize(n,d)
raise ArgumentError if d == 0
@n, @b = n, d
end
end
// Scala
class Example(n: Int, d: Int) {
@paxer
paxer / gist:3479ba8f0dc6c2397fbc
Created July 8, 2015 00:10
Semantic UI components css class names vs Google's Material Design Lite for web
<!-- LOL -->
<!-- http://semantic-ui.com/elements/button.html -->
<button class="ui button">
Follow
</button>
<!-- http://www.getmdl.io/components/index.html#buttons-section -->
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
Button
@paxer
paxer / gist:965601
Created May 10, 2011 23:22
SecureRandom
# random hexadecimal string.
p SecureRandom.hex(10) # => "52750b30ffbc7de3b362"
p SecureRandom.hex(10) # => "92b15d6c8dc4beb5f559"
p SecureRandom.hex(11) # => "6aca1b5c58e4863e6b81b8"
p SecureRandom.hex(12) # => "94b2fff3e7fd9b9c391a2306"
p SecureRandom.hex(13) # => "39b290146bea6ce975c37cfc23"
...
# random base64 string.
p SecureRandom.base64(10) # => "EcmTPZwWRAozdA=="
@paxer
paxer / main.go
Last active June 19, 2017 23:17
Go inital version
package main
import (
"os"
"fmt"
"encoding/csv"
"io"
"time"
"strconv"
)