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
schema.statics = { | |
getSingleton: function (cb) { | |
this.findOne() | |
.sort({ updated: -1 }) | |
.limit(1) | |
.exec((err, model) => { | |
if (err) { | |
cb(err, null); | |
} else if (!model) { | |
cb(err, new this()); |
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
FROM node | |
RUN mkdir -p /app | |
WORKDIR /app | |
# .deps.json will only bust the cache when the package.json dependencies change | |
COPY .deps.json /app/package.json | |
RUN npm install | |
# cache will almost always bust here, but it's only copying files |
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
#!/bin/bash | |
#Vars | |
web_service='nginx' | |
config_path='/usr/local/letssl/' | |
le_path='/opt/letsencrypt' | |
exp_limit=20; | |
#Func | |
function check_ssl { |
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
// Use wherever a fixed position is declared to adjust for that pesky WP admin bar. | |
@mixin wp-admin-bump{ | |
.admin-bar & { | |
margin-top: 46px; | |
@media screen and (min-width: 782px){ | |
margin-top: 32px; | |
} | |
} | |
} |
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
module.exports = { | |
'HOSTPATH': 'http://your.host.here', | |
'PORT': 80, | |
'EXPRESS_SESSION_SECRET': '123456', | |
'TWITTER_CONSUMER_KEY': 'your-consumer-key-here', | |
'TWITTER_CONSUMER_SECRET': 'your-secret-here', | |
'GOOGLE_APP_ID': 'your-app-id-here', | |
'GOOGLE_CONSUMER_SECRET': 'your-consumer-secret-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
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- | |
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/vbox' |