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
module.exports = { | |
names: ["http-link-warning"], | |
description: "Rule that reports an error for non-https links", | |
tags: ["links"], | |
function(params, onError) { | |
params.tokens | |
.filter((token) => token.type === "inline") | |
.flatMap((token) => token.children) | |
.filter( | |
(token) => |
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
#!/bin/sh | |
FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.md" | sed 's| |\\ |g') | |
test -z "$FILES" && exit 0 | |
URLS=$(echo "$FILES" | xargs egrep -o 'http://[^ )]+') | |
test -z "$URLS" && exit 0 | |
echo -e "\e[31mInsecure links:\e[0m\n$URLS" | |
#exit 1 |
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
#!/bin/sh | |
set -exo pipefail | |
curl -L https://imperialcollegelondon.box.com/shared/static/wm84f86ikub5mceibprp61cd7jxwanzp.gz | tar xz -C /opt | |
if [ -f /opt/mridb/conf/application-site.conf ]; then | |
echo "Updated MRIdb: $(cat /opt/mridb/VERSION)" | |
exit | |
fi |
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
#!/bin/sh | |
set -exo pipefail | |
curl -L https://imperialcollegelondon.box.com/shared/static/wm84f86ikub5mceibprp61cd7jxwanzp.gz | tar xz -C /opt | |
if [ -f /opt/mridb/conf/application-site.conf ]; then | |
echo "Updated MRIdb: $(cat /opt/mridb/VERSION)" | |
exit | |
fi |
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
{ | |
url: 'https://api-partner.network.xero.com/oauth/AccessToken', | |
oauth: { | |
signature_method, | |
consumer_key, | |
private_key, | |
token, | |
session_handle | |
}, | |
key, |
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 consumer_key = '...'; | |
var request = require('request').defaults({ | |
oauth: { | |
consumer_key: consumer_key, | |
token: consumer_key, | |
signature_method : 'RSA-SHA1', | |
private_key: require('fs').readFileSync('privatekey.pem') | |
}, | |
json: true | |
}); |
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
ADDRESS=10.10.0.2 | |
CLIENT=$(hostname -s) | |
yum install -y epel-release | |
yum install -y tinc | |
mkdir -p /etc/tinc/hosts | |
cat >/etc/tinc/tinc.conf <<EOF | |
Name=$CLIENT | |
ConnectTo=vp1 | |
EOF | |
tincd -K </dev/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
var request = require('request'); | |
var CONSUMER_KEY = 'YOUR_XERO_CONSUMER_KEY'; | |
var accountCodes = { | |
eating_out: 420 | |
}; | |
export default async function(hook) { | |
var transaction = hook.params; | |
if (/#expenses(?: |$)/.test(transaction.data.notes)) { | |
hook.res.end(); | |
} |
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
[ | |
{ | |
"company": "Pulselive", | |
"stand": "64", | |
"room": "Blue", | |
"saturday": true, | |
"sunday": true, | |
"mission": "We partner with some of the biggest global sports organisations to deliver websites and mobile apps that inform, entertain and engage sports fans." | |
}, | |
{ |
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
export METEOR_SETTINGS=$(</etc/chaser.json) | |
export ROOT_URL=http://<HOSTNAME> | |
export MAIL_URL=smtp://... | |
export MONGO_URL=mongodb://DBSERVER/meteor | |
export MONGO_OPLOG_URL=mongodb://DBSERVER/local | |
export PORT=3000 | |
export HTTP_FORWARDED_COUNT=1 | |
export KADIRA_APP_ID=... | |
export KADIRA_APP_SECRET=... | |
node /opt/chaser/main.js |
NewerOlder