-
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);
/* | |
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* - Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* |
#!/bin/sh | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
MASTER_PID="" | |
CELERY_PID="" | |
BEAT_PID="" | |
if [ ! -d log ];then |
#!/usr/bin/env bash | |
## Installation | |
# curl -o serve-tomcat.sh https://gist.githubusercontent.com/lesstif/4d162c4c8df756a65286/raw | |
# sudo mv serve-tomcat.sh /usr/local/bin/ | |
# sudo chmod +x /usr/local/bin/serve-tomcat.sh | |
if [ "$#" -lt 2 ]; then | |
echo "Error: missing required minimal 2 parameters."; | |
echo "Usage: "; |
#!/usr/bin/env bash | |
## Installation | |
## curl -o /usr/local/bin/serve-php.sh https://gist.githubusercontent.com/lesstif/82c107282241c7a52ad9/raw | |
## chmod +x /usr/local/bin/serve-php.sh | |
SA="/etc/nginx/sites-available/" | |
SE="/etc/nginx/sites-enabled/" | |
test=0 |
... | |
action_with_slack_notification = %(banaction)s[name=%(__name__)s, port="%(port)$ | |
slack[name=%(__name__)s] | |
action = %(action_with_slack_notification)s | |
... |
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated September 2024 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
#!/bin/sh | |
killproc() { | |
local servicename=$1 | |
local user=$2 | |
local signal="TERM" | |
if [ "$#" = 0 ] ; then | |
echo $"Usage: killproc {servicename} {user} {signal}" | |
return 1 |
#!/bin/bash | |
# | |
# tomcat | |
# | |
# chkconfig: 345 96 30 | |
# description: Start up the Tomcat servlet engine. | |
# | |
# processname: java | |
# pidfile: /var/run/tomcat.pid | |
# |