User- The FreshBooks account, whose information we are trying to access via OAuthConsumer- The FreshBooks account, who we authorize to access the user's informationConsumer key- The consumer's subdomain,consumer_key.freshbooks.comConsumer Secret- The consumer's secret, that we will use to make OAuth requests.Request Token- A value used by the consumer to obtain authorization and an access token from the user.Access Token- A value used by the consumer to access the user's information.Access Token Secret- A secret used by the consumer to establish ownership of a given Token.
| ## | |
| ## This nginx.conf servers as the main config file for webflow reverse proxy | |
| ## | |
| ## RCS: | |
| ## https://gist.github.com/sansmischevia/5617402 | |
| ## | |
| ## Hardening tips: | |
| ## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html | |
| ## |
| import requests | |
| class HoverException(Exception): | |
| pass | |
| class HoverAPI(object): | |
| def __init__(self, username, password): | |
| params = {"username": username, "password": password} | |
| r = requests.post("https://www.hover.com/api/login", params=params) |
| {% comment %}How To Show Percentage Discount Saved{% endcomment %} | |
| {% if product.compare_at_price_max > product.price %}You save {{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: ‘.0′}}%{% endif %} |
Sass is a powerhouse language that is adding new features all the time. For this introduction we will go over the basics of the language and see how they all tie together. We will discuss nesting, parent selector definitions, variables, Sass math, @extends, and @mixins.
Commenting your code is the number one awesome thing any developer can do. In CSS you can place comments in your code /* */, but this will appear in the actual CSS and sometimes you don't want or need all that stuff to be there.
In Sass comments are highly encouraged. Sass has what are called 'silent comments' using the // syntax. This will allow the developer to comment like crazy and none of this is exposed in the final CSS. An interesting feature is that Sass supports both types of comments.
Scss
| <?php | |
| //add your server aliases here | |
| $servers = array( | |
| "185.14.184.234" => "mcfly.bensmann.no", | |
| "185.14.184.xxx" => "another.server.com", | |
| ); | |
| //this script is triggered by this command from the terminal or cron: | |
| //echo "time=`uptime`&df=`df -h`" | curl -s -d @- http://domain.com/path/to/script.php |
| #!/bin/bash | |
| USER=YOUR_USERNAME | |
| HOST=YOUR_SERVER_HOSTNAME | |
| WEBPATH=PATH_TO_WEBSERVER_ROOT | |
| WEBURL=YOUR_URL | |
| BACKUP_DIR=DIR_FOR_BACKUP | |
| file=$(mktemp $BACKUP_DIR/XXXXXX) | |
| mv $file $file.html |
| #!/bin/bash | |
| # Sync Homebrew installations between Macs via Dropbox | |
| # | |
| BREW="/usr/local/bin/brew" | |
| # first get local settings | |
| echo "Reading local settings ..." | |
| rm -f /tmp/brew-sync.* |
| <!DOCTYPE HTML> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| </head> | |
| <body> | |
| <video></video> | |
| <script> | |
| window.addEventListener('DOMContentLoaded', function() { | |
| 'use strict'; |
| <figure class="quote"> | |
| <blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
| </figure> |