Skip to content

Instantly share code, notes, and snippets.

View remigijusj's full-sized avatar

Remigijus Jodelis remigijusj

View GitHub Profile
@Efreak
Efreak / startwsl.vbs
Created November 25, 2016 20:40
Start persistent WSL with services and byobu in background. To launch byobu with wsltty, use the command in wsl.bat, and replace /bin/bash with /usr/bin/byobu. Raw
'syntax
' - Run: http://ss64.com/vb/run.html or https://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx
' - Sleep: http://ss64.com/vb/sleep.html or https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
'start hidden byobu in WSL. If you like playing with zsh modules so much that your prompt frequently takes a long time to load, you'll want this.
CreateObject ("Wscript.Shell").Run "C:\Windows\System32\bash.exe -c byobu", 0, false
'give it a bit to finish starting. https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
WScript.Sleep(3000)

Deploying Elixir and Phoenix applications using Docker and Exrm

Goal

By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.

Assumptions

  1. You already have a working Elixir environment with the Phoenix Framework installed
  2. You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
@PkmX
PkmX / loeb.md
Last active January 9, 2019 15:59
Löb with error handling

Löb with error handling

löb is a well-known function in Haskell for implementing spreadsheet-like behaviors and tying the knot. It is defined as:

loeb :: Functor f => f (f a -> a) -> f a
loeb fs = xs
  where xs = fmap ($ xs) fs
@rcdilorenzo
rcdilorenzo / duration.ex
Created February 20, 2016 01:20
A simple construction of a duration time (e.g. "01:30" or "01:30:23") as a custom ecto type
defmodule Duration do
@moduledoc """
This duration module parses and formats strings
for a time duration in hours and minutes and
optionally seconds (e.g. 01:00 for an hour,
00:01:10 for one minute and ten seconds).
"""
@match ~r/^(?<hour>\d{1,2}):(?<min>\d{1,2}):?(?<sec>\d{0,2})$/
def parse(string) do
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@adamcooke
adamcooke / dsl.rb
Created November 7, 2014 15:20
The complete code from my DSL tutorial at http://blog.atechmedia.com/ruby-dsls-for-fun/
class AddressBook
def contacts
@contacts ||= []
end
def self.load_from_path(path)
# Create a new AddressBook instance
address_book = self.new
# Create a new AddressBookDSL instance
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 5, 2024 04:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@futhr
futhr / TechDecisions.md
Last active October 4, 2015 12:58 — forked from hardbap/TechDecisions.md
Choices to make in a new Rails project.

Team Support

Source Code Control

Github
Alternative: Bitbucket, git (private server)

Time Tracking

None