Skip to content

Instantly share code, notes, and snippets.

View mz0's full-sized avatar
☂️
לֹא הַבַּיְשָׁן לָמֵד‎

Mark Zhitomirski mz0

☂️
לֹא הַבַּיְשָׁן לָמֵד‎
View GitHub Profile
@mz0
mz0 / Login2.feature
Last active November 23, 2015 08:12
"Automated testing with Selenium and Cucumber" - Listing 2
Feature: Test Login
Scenario Outline: Login Success and Failure
Given I navigate to the mock application
When I try to login with '<type>' credentials
Then I should see that I logged in '<status>'
Examples:
| type | status |
| valid | successfully |
| invalid | unsuccessfully |
@mz0
mz0 / Env.java
Last active December 3, 2015 08:13
List JVM's System properties
public class Env {
public static void main(String[] args) {
System.getProperties().list(System.out);
}
}
@mz0
mz0 / TODO-dep-management
Created November 23, 2015 08:10
Re-use .m2 in Ivy.
mz0@mzi5:~$ du -sh ~/.ivy2/ ~/.m2/
272M /home/mz0/.ivy2/
140M /home/mz0/.m2/
http://stackoverflow.com/questions/6216224/use-maven-repository-as-local-ivy-cache
specify the cache and the layout of the cache by using the
<cache/> Tag
The Tag is described here: http://ant.apache.org/ivy/history/2.0.0/settings/caches.html
@mz0
mz0 / try_wd.py
Last active December 3, 2015 07:47
# -*- coding: utf-8 -*-
from os.path import expanduser
from selenium.webdriver import FirefoxProfile, Firefox
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
home = expanduser("~")
@mz0
mz0 / tiny.asm
Last active April 28, 2016 12:41
Tiny42.asm with a tiny ORG - untested
BITS 64
org 0x1000
; cat /proc/sys/vm/mmap_min_addr
; sysctl -w vm.mmap_min_addr="0"
; https://wiki.debian.org/mmap_min_addr Debian 5.0.4 kernel 2.6.26 min 4096 2010.01.30
ehdr: ; Elf64_Ehdr
db 0x7f, "ELF", 2, 1, 1, 0 ; e_identr
;'2' class ELF64, '1' - Little-ending data, '1' version, '0' none/SYSV ('1' HP-UX is also Ok)
times 8 db 0
@mz0
mz0 / usbdevgone.sh
Last active October 28, 2017 21:42
#!/bin/sh
#
# Class 03h - HID
# Subclass 00h - None, 01h - Boot Interface
# Protocol 00h - None, 01h - Keyboard, 02h - Mouse
HID11='3/1/1'
HID00='3/0/0'
/usr/bin/echo "removal $1 $2" >> /tmp/device-remove.env
@mz0
mz0 / gist:7014777a2910bbfc55d649277930120d
Last active January 4, 2017 13:07
Powercom UPS - Debian 8
PTM-850/AP
dmesg:
usb 4-1: new low-speed USB device number 2 using ohci-pci
usb 4-1: New USB device found, idVendor=0d9f, idProduct=0004
usb 4-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
usb 4-1: Product: HID UPS Battery
usb 4-1: Manufacturer: POWERCOM Co.,LTD
usb 4-1: SerialNumber: 004-0D9F-000
hid-generic 0003:0D9F:0004.0003: hiddev0,hidraw2: USB HID v1.00 Device [POWERCOM Co.,LTD HID UPS Battery] on usb-0000:00:12.0-1/input0
@mz0
mz0 / TL-WN721N.log
Last active February 7, 2017 15:13
TL-WN721N USB WiFi
Bus 002 Device 006: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
#Toshiba notebook, Fedora 25, kernel 4.9.6-200.fc25.x86_64, left (USB 2.0) port
usb 2-1.2: new high-speed USB device number 6 using ehci-pci
usb 2-1.2: New USB device found, idVendor=0cf3, idProduct=9271
usb 2-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
usb 2-1.2: Product: USB2.0 WLAN
usb 2-1.2: Manufacturer: ATHEROS
usb 2-1.2: SerialNumber: 12345
usb 2-1.2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
@mz0
mz0 / Git-url-fetch-push.md
Last active April 5, 2017 11:08
Git on two legs