Skip to content

Instantly share code, notes, and snippets.

View yucer's full-sized avatar

Yurdik Cervantes yucer

View GitHub Profile
@yucer
yucer / bash_fs_watcher_inotify.sh
Created August 3, 2017 08:46
filesystem watcher with inotify-tools
# sudo apt-get install inotify-tools
watch_dir ()
{
inotifywait -m $1 -e create -e moved_to | while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'";
done
}
# usage example:
@yucer
yucer / Newtab.java
Last active August 8, 2017 10:15
Open new tab with selenium in Java (plus profile and capabilities)
package automationFramework;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
@yucer
yucer / selenium_new_tab.py
Created August 2, 2017 13:35
Script to test opening new tab with selenium RemoteWebDriver
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import time
import tempfile
import logging
@yucer
yucer / debug-smtpd
Created February 11, 2016 16:26 — forked from tachesimazzoca/debug-smtpd
Python SMTP Debugging Server #python
#!/usr/bin/python
import asyncore
import logging
import smtpd
import sys
log = logging.getLogger('debug-smtpd')
class LoggingSMTPServer(smtpd.SMTPServer):