#check to see if there is network connection
has_network(){
# Capture a basic ping result to Google's primary DNS server to determine if
# outside access is available to us. If this does not reply after 2 attempts,
# we try one of Level3's DNS servers as well. If neither of these IPs replies to
# a ping, then we'll skip a few things further in provisioning rather than
####pull from editor to for quickkeying####
$str='<taxonomy alias="Abnormal dreams" name="Abnormal dreams" taxonomy_type="adverse_events" content=""/>';
$text = preg_replace_callback('/alias="(.*?)"/im',"toLower",$str);
echo $text;
function toLower($matches){
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"servers":{ | |
"server2": { | |
"remote": { | |
"ip": "10.255.255.3", | |
"salt":{ | |
"minion":"server_build", | |
"env": [ | |
"serverbase", | |
"database", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
pushdoc = "!f(){ git add -A; git commit -m ${0} && git push; };f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( window, $, WSU ){ | |
WSU.time = null; | |
WSU.timer = function( time, callback){ | |
console.log("clear old timer"); | |
window.clearTimeout(WSU.time); | |
WSU.time = null; | |
console.log("set timer"); | |
WSU.time = window.setInterval(function(){ | |
console.log("do timer callback"); | |
if( "function" === typeof callback){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var values = new[] | |
{ | |
new[] { 1, 2 }, | |
new[] { 2, 3 }, | |
new[] { 4, 5 }, | |
}; | |
var flattenedUniqueValues = values.SelectMany(x => x).Distinct();//technically it handles none int too |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-01-08T10:54:06.695Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-ZipFiles { | |
param ( | |
[string]$Path = (Get-Location), | |
[string]$GitIgnorePath = (Join-Path -Path (Get-Location) -ChildPath ".gitignore") | |
) | |
# Read .gitignore file | |
$gitIgnorePatterns = Get-Content -Path $GitIgnorePath | Where-Object { |
OlderNewer