Skip to content

Instantly share code, notes, and snippets.

View Vaysman's full-sized avatar

Mikhail Vaysman Vaysman

  • SkyWorkz
  • Hilversum
View GitHub Profile
@Vaysman
Vaysman / Flexible Dockerized Phoenix Deployments.md
Last active October 16, 2019 10:28 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

for (i=0;i<60;i++){
var test;
test = "CODE:";
test +="TAG POS=1 TYPE=DIV ATTR=TXT:Withdraw" + "\n";
var w1 = ("name")
var w2 = ("name")
var itemname = content.document.getElementsByClassName("item-name")[i].innerHTML
if (w1 != itemname)
{iimDisplay("aaaa!" + i)}
else{content.document.getElementsByClassName("item-name")[i].click()
@Vaysman
Vaysman / build.gradle
Last active August 29, 2015 14:16 — forked from Arakade/build.gradle
import com.petebevin.markdown.MarkdownProcessor
import org.xhtmlrenderer.pdf.ITextRenderer
import org.ccil.cowan.tagsoup.Parser
import org.apache.xalan.xsltc.trax.SAX2DOM
import org.xml.sax.InputSource
buildscript{
repositories {
mavenCentral() // i.e. http://repo1.maven.org/maven2
maven { url "https://oss.sonatype.org/content/groups/scala-tools" }

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@Vaysman
Vaysman / gist:9053305
Last active August 29, 2015 13:56 — forked from avdi/gist:9038972
# You will need the pygments and xclip packages
# This example highlights some Bash source code
# '-O noclasses=true' tells pygments to embed colors inline in the source
# the '-t text/html' option tells xclip what "target" to specify for the selection
pygmentize -l java -f html -O noclasses=true,encoding=utf-8 Main.java | pbcopy
# Another example
pbpaste | pygmentize -l ruby -f rtf -O noclasses=true,encoding=utf-8 | pbcopy
@Vaysman
Vaysman / 0-readme.md
Created June 19, 2012 09:18 — forked from burke/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@Vaysman
Vaysman / s.rb
Created April 11, 2012 07:33 — forked from jacksonwillis/s.rb
Sentences as Ruby code
class S; def initialize *w; @s=w; end; def method_missing *w;@s<<w;self;end;def
to_ary;[@s.map{ |e| e=~/[\,\.\:\-\(\)\/\'\"]/?[e]:[" ",e] }.join.strip];end;end
def Object.const_missing(c);S.new c;end; ###### https://gist.github.com/2354740
puts This.is.a.sentence.represented.by.a.Ruby.expression(",").try.it.out! #####
@Vaysman
Vaysman / README.md
Created May 16, 2011 08:58 — forked from ryanb/README.md
My Github Issues

First install the required gems:

gem install octokit awesomeprint rainbow

Then run it to extract all of your open GitHub issues into files (with comments).

ruby my-gh-issues.rb