Skip to content

Instantly share code, notes, and snippets.

@RomanVlasenko
RomanVlasenko / gist:4738194
Created February 8, 2013 11:10
articles about adaptive design frameworks
[13:06:54] Oleksii Novakov: http://habrahabr.ru/post/156747/
[13:07:07] Oleksii Novakov: http://habrahabr.ru/post/156425/
[13:07:21] Oleksii Novakov: http://nicinabox.com/blog/why-i-use-foundation-over-bootstrap/
[13:07:28] Oleksii Novakov: http://designshack.net/articles/css/framework-fight-zurb-foundation-vs-twitter-bootstrap/
@RomanVlasenko
RomanVlasenko / gist:5611529
Last active December 17, 2015 12:39
Deadlock example
public class Operations {
public static void main(String[] args) {
final Account a = new Account(1000);
final Account b = new Account(2000);
new Thread(new Runnable() {
@Override
public void run() {
transfer(a, b, 500);
}
}).start();
public class Main {
public static void main(String[] args) {
Set<Integer> set = new TreeSet<Integer>(new Comparator<Integer>() {
@Override
public int compare(final Integer o1, final Integer o2) {
return 0;
}
});
set.add(1); set.add(2); set.add(1);
@RomanVlasenko
RomanVlasenko / gist:7808557
Last active December 30, 2015 09:19
Copy resource files from java to resources folder (maven style)
import java.io.File;
import java.io.IOException;
/**
* @author Roman Vlasenko (RVL) / WorldTicket A/S
* @version $Revision: 1.0 $ $Date: 12/5/13 $
*/
public class FileMover {
public static void main(String args[]) {
@RomanVlasenko
RomanVlasenko / gist:8003579
Last active December 31, 2015 14:59
Java: string matcher example
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class M {
public static void main(String[] args) {
String url = "http://localhost/blog/booking/?record_locator=FN0RGA";
Pattern p = Pattern.compile("record_locator=((\\d|\\w){6})");
Matcher matcher = p.matcher(url);
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
driver.get("http://www.kinopoisk.ru/film/596001/")
try:
swagger: "2.0"
info:
title: "BE Assignment"
version: "1.0.0"
consumes:
- "application/json"
produces:
- "application/json"
schemes:
- "https"