Skip to content

Instantly share code, notes, and snippets.

@royopa
royopa / selenium-php-webdriver-cheatsheet.md
Created January 6, 2020 00:57 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "peru/windows-10-enterprise-x64-eval"
config.vm.synced_folder "data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
@royopa
royopa / Dockerfile
Created April 17, 2019 11:05
PHP 7.4
FROM debian:stretch-slim
ARG USER_PUID=1000
ARG USER_PGID=1000
ARG USER_NAME=php
RUN groupadd --gid $USER_PGID $USER_NAME \
&& useradd --uid $USER_PUID --gid $USER_NAME -m $USER_NAME
ENV PHPIZE_DEPS \
@royopa
royopa / rsync_backup.py
Created July 21, 2017 07:17 — forked from seebk/rsync_backup.py
Python rsync backup script
#!/usr/bin/python3
#######################################################
# Python rsync Backup script
# Sebastian Kraft, 24.06.2013
#
#######################################################
#-----------------------------------------------------
# Config
/*
TITLE: CODE GRABBER FOR HT6P20B ENCODER
CREATED BY: AFONSO CELSO TURCATO
DATE: 14/JAN/2014
E-MAIL: acturcato (at) gmail.com
LICENSE: GPL
REV.: 00
DESCRIÇÃO:
http://acturcato.wordpress.com/2014/01/14/clonagem-de-controle-remoto-rf-learning-code-ht6p20b-com-arduino/
@royopa
royopa / run.vbs
Created June 6, 2016 13:16 — forked from terrancesnyder/run.vbs
VBScript + Batch to run windows in background
================ run.vbs ================
REM 0 = hide window, 1 = show window (useful for debugging)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & "run.bat" & """" & sargs, 0, False
Set WshShell = Nothing
================ run.bat ================
REM Batch script to start VirtualBox instance of ReviewBoard in headless mode

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
#!/usr/bin/env python
import argparse
import re
import os
import subprocess
try:
import json
except ImportError:
import simplejson as json
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
else
puts "_Info_: Plugin '''vagrant-cachier''' is not installed."