Skip to content

Instantly share code, notes, and snippets.

@Jaykul
Jaykul / Get-MsdnKeys.ps1
Last active August 3, 2022 20:28
PowerShell + Selenium Demo: Getting Started, and reusing cookies with Invoke-Request
# It might work in 4, but I'm not testing there. Lower you'll have to tweak code
#requires -Version 5.0
param(
# Your Live ID for MSDN login
[Parameter(Mandatory)]
[PSCredential]
[System.Management.Automation.CredentialAttribute()]
$Credential,
# Pick a browser to use. Defaults to Firefox (which doesn't seem to require an external Driver file)
@THUFIR
THUFIR / pinerc
Last active December 28, 2016 11:59
alpine pine config pinerc .pinerc
#
# Alpine configuration file
#
# This file sets the configuration options used by Alpine and PC-Alpine. These
# options are usually set from within Alpine or PC-Alpine. There may be a
# system-wide configuration file which sets the defaults for some of the
# variables. On Unix, run alpine -conf to see how system defaults have been set.
# For variables that accept multiple values, list elements are separated by
# commas. A line beginning with a space or tab is considered to be a
# continuation of the previous line. For a variable to be unset its value must
@martinsik
martinsik / parser.php
Created October 2, 2012 19:45
Simple sport results parser in PHP using XPath. For more information visit http://martinsikora.com/parsing-html-pages-using-xpath
<?php
$curl = curl_init('http://www.livescore.com/soccer/england/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10');
$html = curl_exec($curl);
curl_close($curl);
if (!$html) {