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 / 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
@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 / 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 / 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

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

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@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" }
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()