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
# CONVERT DICOM IMAGES TO JPG | |
# Needs Imagemagick, plus the Rmagic and Dicom gems: | |
#$ gem install rmagic | |
#$ gem install dicom | |
require 'dicom' | |
include DICOM | |
files = Dir.glob("/path/to/dicom/image/files/*") | |
puts files.length |
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
[Unit] | |
Description=Passenger Standalone Application Server | |
After=network.target | |
[Service] | |
Type=forking | |
PrivateTmp=yes | |
User=nginx | |
Group=nginx | |
WorkingDirectory=/srv/www/%i |
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
http { | |
... | |
server { | |
... | |
error_page 401 @401; | |
location @401 { | |
root /srv/www/error-documents/public; | |
try_files /401.html =401; | |
} |
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
FROM node:latest | |
MAINTAINER ejangi <[email protected]> | |
VOLUME ["/usr/src/app"] | |
EXPOSE 3000 | |
WORKDIR /usr/src/app | |
ADD package.json /usr/src/app/package.json |
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
<?php | |
add_filter( 'register_post_type_args', function ( $args, $post_type ){ | |
if ($post_type == 'my-post-type-slug'){ | |
$args['rewrite']['slug'] = 'short'; | |
} | |
return $args; | |
}, 10, 2 ); |
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
IF( | |
AND( | |
ISBLANK(Last_Fundraiser_date__c), | |
ISBLANK(npo02__LastCloseDate__c), | |
ISBLANK(npo02__LastCloseDateHH__c), | |
ISBLANK(npo02__LastMembershipDate__c), | |
ISBLANK(npsp__Last_Soft_Credit_Date__c), | |
ISBLANK(GW_Volunteers__Last_Volunteer_Date__c) | |
), | |
NULL, |
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
FROM wordpress:4.9.8-php7.1 | |
RUN a2enmod ssl | |
RUN a2ensite default-ssl | |
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -subj "/C=AU/ST=Queensland/L=Brisbane/O=Example/CN=127.0.0.1/" -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem |
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
AND( | |
LEN(Phone) > 0, | |
( BillingCountry == "" || BillingCountry == "AU" || BillingCountry == "Australia"), | |
NOT(REGEX( Phone ,"(^1300(| )[0-9]{3}(| )[0-9]{3}(ext[0-9]{1,5})?$)|(^1800|1900|1902(| )[0-9]{3}(| )[0-9]{3}(ext[0-9]{1,5})?$)|(^(\\+61|0)[2|3|7|8]{1}(| )[0-9]{4}(| )[0-9]{4}(ext[0-9]{1,5})?$)|(^13(| )[0-9]{4}$)|(^(\\+61|0)4[0-9]{2,3}(| )[0-9]{3}(| )[0-9]{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
%%[ | |
var @subscriberRows | |
set @subscriberRows = RetrieveSalesforceObjects( "Contact", "FirstName, Id", "Id", "=", _subscriberKey) | |
if RowCount(@subscriberRows) == 1 then /* there should only be one row */ | |
var @subscriberRow, @FirstName, @Id | |
set @subscriberRow = Row(@subscriberRows, 1) | |
set @FirstName = Field(@subscriberRow, "FirstName") | |
set @Id = Field(@subscriberRow, "Id") | |
endif |