Skip to content

Instantly share code, notes, and snippets.

View Vaysman's full-sized avatar

Mikhail Vaysman Vaysman

  • SkyWorkz
  • Hilversum
View GitHub Profile
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 / report.md
Last active December 23, 2016 10:07

Pre-flight Build Pitfalls

Problem

  1. Post-factum CI
  • Error(s) already in code base
  • Difficult to rollback changes
  1. Manual merge
  • Cumbersome
  • Difficult
  • Error-prone
/**
* Causes <i>doRun.run()</i> to be executed asynchronously on the
* AWT event dispatching thread. This will happen after all
* pending AWT events have been processed. This method should
* be used when an application thread needs to update the GUI.
* In the following example the <code>invokeLater</code> call queues
* the <code>Runnable</code> object <code>doHelloWorld</code>
* on the event dispatching thread and
* then prints a message.
* <pre>
@Vaysman
Vaysman / RoundButton.java
Created January 31, 2016 13:48
How to create round button on java script
/*
Code imported from
http://stackoverflow.com/a/26851888
*/
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
@Vaysman
Vaysman / 123.tape
Last active December 11, 2015 22:58
code sample 1
write 1
dump
right
write 2
dump
left
left
write 3
dump
@Vaysman
Vaysman / Gemfile
Created December 6, 2012 01:28
Simple app with cookie
source :rubygems
gem 'sinatra'
gem 'sinatra-contrib'
@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! #####
class BlahBlah < ActiveRecord::Migration
def up
puts "Records: #{TestResult.count}\n"
Feature.destroy_all
TestResult.all.each do |e|
begin
e.update_attribute(:generated, nil)
rescue ActiveRecord::RecordInvalid => er
puts "###\nId: #{er.record.id}\n###\nErrors:\n\t#{er.record.errors.full_messages.join("\n")}\n"
end