-
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);
#!/bin/bash | |
# Hosted Zone ID e.g. BJBK35SKMM9OE | |
ZONEID="enter zone id here" | |
# The CNAME you want to update e.g. hello.example.com | |
RECORDSET="enter cname here" | |
# More advanced options below | |
# The Time-To-Live of this recordset |
private final let screenBound = UIScreen.mainScreen().bounds | |
private var screenWidth: CGFloat { return screenBound.size.width } | |
private var screenHeight: CGFloat { return screenBound.size.height } |
<?php | |
$username = 'ACxxx'; | |
$password = 'xxxx'; | |
$body = "testing from twilio"; | |
$data = http_build_query(['To' => '+61xxxxxx', 'From' => '+48xxxxx', 'Body' => $body]); | |
$context = stream_context_create([ | |
'http' => [ |
// | |
// ViewController.swift | |
// picker | |
// | |
// Created by Slawomir Jasinski on 30/11/16. | |
// Copyright © 2016 Slawomir Jasinski. All rights reserved. | |
// | |
import UIKit |
SELECT id, DATE_FORMAT(FROM_UNIXTIME(`time`), '%e %b %Y') AS 'date_formatted' FROM api_logs WHERE `time` < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 3 MONTH)) ORDER BY id DESC |
#!/bin/sh | |
SERVICE_RUN="/usr/bin/php /home/ec2-user/docker/index.php worker" | |
SERVICE="/usr/bin/php" | |
if ps ax | grep -v grep | grep $SERVICE > /dev/null; then echo -n ""$SERVICE" : "running","; else echo -n ""$SERVICE" : "not running","; $SERVICE_RUN; fi |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: caddy | |
# Required-Start: $local_fs $network $named $time $syslog | |
# Required-Stop: $local_fs $network $named $time $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the caddy web server | |
# Description: starts caddy using start-stop-daemon | |
### END INIT INFO |
SetEnv CI_ENV "testing" | |
# Options | |
Options -Multiviews | |
Options +FollowSymLinks | |
#Enable mod rewrite | |
RewriteEngine On | |
#the location of the root of your site | |
#if writing for subdirectories, you would enter /subdirectory |
MC is a console file manager. It supports FTP connections, and in my experience is faster in FTP than both Krusader and Gnome Commander. | |
However, the default FTP connection format string [username[:password]@]hostname has a drawback of not allowing the use of usernames with ‘@’-symbol in them – which is very common for virtual hostings. | |
One of the solutions is (done in your home directory): | |
if there is no .netrc file in your home directory — touch .netrc && chmod 600 .netrc | |
mcedit .netrc (or use vi, nano, or any other editor you prefer) | |
add the following line to the file (replace all-caps words with your actual credentials): machine HOSTNAME login USER@HOSTNAME password PASSWORD |