(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| #Source https://michaelryom.dk/custom-ddns-on-ubiquiti-usg/ | |
| cat << 'EOF' > /etc/cron.hourly/ddns | |
| #!/bin/bash | |
| IP=$(curl -s -L "http://ipv4.myip.dk/api/info/IPv4Address" | sed -e 's/^"//' -e 's/"$//') | |
| curl -s -L "https://api.unoeuro.com/ddns.php?apikey=<API key>&domain=<Domain>&hostname=<Sub domain>&myip=$IP" | logger | |
| EOF | |
| chmod +x /etc/cron.hourly/ddns |
| #!/bin/bash | |
| set -e | |
| show_help() { | |
| cat << EOF | |
| Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE] | |
| ${0##*/} -h | |
| Open a standard connection in Sequel PRO. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
| # that enables you to choose a character from a menu of options. If you are on Lion | |
| # try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
| # for input. | |
| # | |
| # It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
| # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
| # as it means you cannot press and hold h/j/k/l to move through your file. You have | |
| # to repeatedly press the keys to navigate. |
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <Module> | |
| <ModulePrefs title="OpenSocialGadget OAuth2 sample"> | |
| <OAuth2> | |
| <Service name="[service_name]"> | |
| <Authorization url="https://.../authorize"/> | |
| <Token url="https://.../oauth2/token"/> | |
| </Service> | |
| </OAuth2> | |
| <Require feature="oauthpopup" /> |