Skip to content

Instantly share code, notes, and snippets.

Jakub JakubOboza

Block or report user

Report or block JakubOboza

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
@JakubOboza
JakubOboza / private-docker-regs-with-free-tiers.markdown
Created May 30, 2019
Private Docker registry with free tiers for Developers.
View private-docker-regs-with-free-tiers.markdown

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry

View lols.coffee
class Animal
constructor: (@name) ->
move: (meters) ->
alert @name + " moved #{meters}m."
class Snake extends Animal
move: ->
alert "Slithering..."
super 5
@JakubOboza
JakubOboza / gist:68b64230e9270403526828d82ff2461e
Created Jun 30, 2017 — forked from davidkellis/gist:909449e13905d8bfbd49c30d20f7fbca
Install Ruby 1.8.7 on macOS Sierra (10.12) with rbenv
View gist:68b64230e9270403526828d82ff2461e
brew install apple-gcc42 openssl libyaml libffi
xcode-select --install
export CC=/usr/local/bin/gcc-4.2
export CFLAGS='-g -O2'
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl`
export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl`
# I had to edit the svn repo URL in /usr/local/Cellar/ruby-build/20160913/share/ruby-build/1.8.7-p375 and change the URL from http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7 to https://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7
rbenv install 1.8.7-p375
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@JakubOboza
JakubOboza / say_to_file.markdown
Last active Mar 7, 2017
Speech 'say' on mac to mp3 file
View say_to_file.markdown

Create Aiff file from yout text input

You can do it like this say -f script.txt -o say_output.aiff with text file input or like this say "hello you cheeky scrublords" -o say_output.aiff

Converting to Mp3

Convert using lame like this lame -m m say_output.aiff final_speech.mp3

View Gateway.scala
// Simple bulk only Gateway
// url is for DR (Delivery Reports)
case class Service(name: String, url: String)
// Params your API gets in
case class HttpMessage(service: String, originator: String, msisdn: String, body: String)
// Handles MT's and MO's (maybe should contain service name for sake of simplicity)
case class MQMessage(guid: String, msisdn: String, originator: String, body: String)
// Types of DR's you could send
@JakubOboza
JakubOboza / gist:463586d764287971fc6c28a3f85294b3
Created May 17, 2016
Riak issue with upgrade from old -sname rings to new -name rings.
View gist:463586d764287971fc6c28a3f85294b3
Dear Team
What are we trying to do:
We are trying to change -sname to -name within our existing cluster without taking the cluster down.
We had a call with basho and we were advised to take steps like here:
http://docs.basho.com/riak/1.4.9/ops/running/nodes/renaming/#Multi-Node-Clusters
They didn't work.
View gist:9487cfe49696278c1d51
data Configuration =
Configuration { path :: String,
localhost :: String,
remotehost :: String,
isguest :: Bool,
issuperuser :: Bool,
currentdir :: String,
homedir :: String,
timeconnected :: Integer
}
View promotions.rb
require 'minitest/autorun'
# Money are in floats for simplicity, it should be bigint
# Promotions are prioritized in order [A,B] => A rule is applied first, B rule is applied second
class Item
attr_accessor :name, :price, :product_code
def initialize(name, price, product_code)
@name = name
@price = price
@JakubOboza
JakubOboza / try_out_browser.scala
Last active Aug 29, 2015
super simple web browser using javafx.
View try_out_browser.scala
import javafx.application.Application
import javafx.geometry.HPos
import javafx.geometry.VPos
import javafx.scene.Node
import javafx.scene.Scene
import javafx.scene.layout.HBox
import javafx.scene.layout.Priority
import javafx.scene.layout.Region
import javafx.scene.paint.Color
import javafx.scene.web.WebEngine
You can’t perform that action at this time.