Skip to content

Instantly share code, notes, and snippets.

<?php
class driver_settings {
var $freshman_account = 'testemail@test.com';
var $freshman_password = 'mytest';
var $target_browser = 'firefox';
var $webdriver_host = 'localhost';
var $webdriver_port = '4444';
var $application_url_base = 'http://localhost:8080/';
var $post_url = '/wd/hub';
var $fixture_path = 'X:\programming\tests\scholarship\fixtures\\';
@saltlakeryan
saltlakeryan / gist:4718141
Created February 5, 2013 22:01
diff patch to resolve issue with phpunit where the --tap flag causes exceptions to be thrown (Symfony/Component/Yaml/Inline.php and Symfony/Component/Yaml/Escaper.php not found) when a test does not pass. Apply to file: /usr/share/pear/PHPUnit/Util/Log/TAP.php
--- /tmp/TAP.php 2013-02-05 22:46:41.117423627 +0100
+++ /usr/share/pear/PHPUnit/Util/Log/TAP.php 2013-02-05 19:26:49.759078943 +0100
@@ -48,6 +48,18 @@
require_once 'Symfony/Component/Yaml/Dumper.php';
}
+if (!class_exists('Symfony\\Component\\Yaml\\Inline') &&
+ stream_resolve_include_path('Symfony/Component/Yaml/Inline.php')) {
+ require_once 'Symfony/Component/Yaml/Inline.php';
+}
@saltlakeryan
saltlakeryan / opml_to_subsonic.php
Last active December 15, 2015 01:59
migrate google reader listen subscriptions to subsonic server
<?php
$subsonic_url = "192.168.0.101:4040";
$subsonic_user = "myuser";
$subsonic_pass = "mypass";
#Create xml object from subscriptions.xml opml file
$xml = new SimpleXMLElement(file_get_contents('subscriptions.xml'));
#Narrow feed items to just those for Google Listen with xpath
$listen = $xml->xpath('//outline[@title="Listen Subscriptions"]');
@saltlakeryan
saltlakeryan / freeNAS active directory troubleshooting
Last active December 15, 2015 18:19
Here are some commands I ran on a freenas box to try to troubleshoot why I could not get a username after ssh'ing to the box as an active directory user.
[root@freenas-test ~]# wbinfo -t
checking the trust secret for domain USERS via RPC calls succeeded
[root@freenas-test ~]# ssh ryant@localhost
Could not create directory '/root/.ssh'.
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 54:7d:cc:9a:72:c4:9b:67:ea:bf:e4:f9:2c:97:fb:85.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/root/.ssh/known_hosts).
ryant@localhost's password:
@saltlakeryan
saltlakeryan / sunfirex4500freebsd_iozone.txt
Created May 7, 2013 19:46
results of running iozone on sun fire x4500
root@storage:/mnt/data # iozone -t 16 -b output.xls -F /mnt/data/temp_0 /mnt/da
ta/temp_1 /mnt/data/temp_2 /mnt/data/temp_3 /mnt/data/temp_4 /mnt/data/temp_5 /m
nt/data/temp_6 /mnt/data/temp_7 /mnt/data/temp_8 /mnt/data/temp_9 /mnt/data/temp
_10 /mnt/data/temp_11 /mnt/data/temp_12 /mnt/data/temp_13 /mnt/data/temp_14 /mnt
/data/temp_15
Iozone: Performance Test of File I/O
Version $Revision: 3.397 $
Compiled for 64 bit mode.
Build: freebsd
var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];
public class Main {
public static void main(String[] args) {
StudentGrades grades = new StudentGrades();
grades.promptForInfo();
System.out.println("Your name: " + grades.getName());
System.out.println("Your test name: " + grades.getTestName());
System.out.println("Your score: " + grades.getScore());
}
}
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list'
sudo apt-get update && sudo apt-get install virtualbox-4.2
Owner: CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE
Owner: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
Owner: CN=Go Daddy Root Certificate Authority - G2, O="GoDaddy.com, Inc.", L=Scottsdale, ST=Arizona, C=US
Owner: CN=UTN-USERFirst-Network Applications, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
Owner: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Owner: CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
Owner: CN=Hellenic Academic and Research Institutions RootCA 2011, O=Hellenic Academic and Research Institutions Cert. Authority, C=GR
Owner: CN=UTN - DATACorp SGC, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
Owner: CN=Hongkong Post Root CA 1, O=Hongkong Post, C=HK
Owner: CN=NetLock Uzleti (Class B) Tanusitvanykiado, OU=Tanusitvanykiadok, O=NetLock Halozatbiztonsagi Kft., L=Budapest, C=HU
https://ministry.eng.utah.edu/rt/Search/Results.html?Order=DESC&Query=%28Queue+%3D+%27mmc-student-staff%27+OR+Queue+%3D+%27nanofab-student-staff%27+OR+Queue+%3D+%27nanofab-support%27++%29+AND+%28Status+%3D+%27new%27+OR+Status+%3D+%27open%27+OR+Status+%3D+%27stalled%27%29%0D%0A&Rows=50&SavedChartSearchId=&OrderBy=Created&Page=1&HideResults=0&Format=%0D%0A+++%27%3Cb%3E%3Ca+href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0D%0A+++%27%3Cb%3E%3Ca+href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0D%0A+++Status%2C%0D%0A+++QueueName%2C%0D%0A+++OwnerName%2C%0D%0A+++Priority%2C%0D%0A+++%27__NEWLINE__%27%2C%0D%0A+++%27%27%2C%0D%0A+++%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0D%0A+++%27%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E%27%2C%0D%0A+++%27%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E%27%2C%0D%0A+++%27%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E%27%2C%0D%0A+++%27%3Csmall%3E_