This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
This file contains hidden or 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 AWS = require('aws-sdk'); | |
| AWS.config.region = 'your aws region'; | |
| AWS.config.update({ | |
| accessKeyId: "your access id", | |
| secretAccessKey: "your secret access key", | |
| }); | |
| var sns = new AWS.SNS(); | |
| var params = { |
This file contains hidden or 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
| version: '2' | |
| services: | |
| myapp: | |
| build: . | |
| container_name: "myapp" | |
| image: debian/latest | |
| environment: | |
| - NODE_ENV=development | |
| - FOO=bar | |
| volumes: |
This file contains hidden or 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
| sudo: required #is required to use docker service in travis | |
| language: php #can be any language, just php for example | |
| services: | |
| - docker # required, but travis uses older version of docker :( | |
| install: | |
| - echo "install nothing!" # put your normal pre-testing installs here |
This file contains hidden or 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
| <ApplicationManifest> | |
| ... | |
| <ServiceManifestImport> | |
| <ServiceManifestRef ServiceManifestName="SERVICENAME" ServiceManifestVersion="1.0.0" /> | |
| <Policies> | |
| <EndpointBindingPolicy CertificateRef="MyCertificateName" EndpointRef="ServiceEndpoint" /> | |
| </Policies> | |
| </ServiceManifestImport> | |
| ... | |
| <Certificates> |
This file contains hidden or 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
| URL="http://stackoverflow.com/" | |
| # store the whole response with the status at the and | |
| HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL) | |
| # extract the body | |
| HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') | |
| # extract the status | |
| HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') |
This file contains hidden or 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
| global | |
| log 127.0.0.1 local2 | |
| chroot /var/lib/haproxy | |
| pidfile /var/run/haproxy.pid | |
| maxconn 4000 | |
| user haproxy | |
| group haproxy | |
| daemon |
This file contains hidden or 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
| using System; | |
| using System.Net; | |
| using System.DirectoryServices; | |
| using System.DirectoryServices.Protocols; | |
| using System.Security.Permissions; | |
| namespace LdapConnection | |
| { | |
| [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)] | |
| public class LdapConnect |
This file contains hidden or 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
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Text; | |
| namespace Examples.System.Net | |
| { | |
| public class WebRequestPostExample | |
| { |
This file contains hidden or 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
| // REQUIRES: | |
| // moment.js - http://momentjs.com/ | |
| // USAGE: | |
| // {{ someDate | moment: [any moment function] : [param1] : [param2] : [param n] | |
| // EXAMPLES: | |
| // {{ someDate | moment: 'format': 'MMM DD, YYYY' }} | |
| // {{ someDate | moment: 'fromNow' }} |