EDIT: original uses the var for declaring variables. In this fork all var are replaced with let.
let state = {
id: 1,
points: 100,
name: "Goran"
};| # for detailed explaination @see # https://gist.github.com/plentz/6737338 | |
| server_tokens off; | |
| add_header X-Frame-Options SAMEORIGIN; | |
| add_header X-Content-Type-Options nosniff; | |
| add_header X-XSS-Protection "1; mode=block"; | |
| add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'"; | |
| # as we use Azure the SSL part is done by the WebApp Service | |
| server { | |
| listen 80 default; |
| // mock file | |
| function MockFile() { }; | |
| MockFile.prototype.create = function (name, size, mimeType) { | |
| name = name || "mock.txt"; | |
| size = size || 1024; | |
| mimeType = mimeType || 'plain/txt'; | |
| function range(count) { | |
| var output = ""; |
When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add. When you make a commit, the changes that are committed are those that have been added to the index.
git reset changes, at minimum, where your current branch is pointing. The difference between --mixed and --soft is whether or not your index is also modified. So, if we're on branch master with this series of commits:
- A - B - C (master)
HEADpoints to C and the index matches C.
| #!/usr/bin/env bash | |
| # https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce | |
| # https://docs.docker.com/compose/install/ |
| <?php | |
| /* | |
| Extends Visual Composer | |
| More information can be found here: http://kb.wpbakery.com/index.php?title=Category:Visual_Composer | |
| */ | |
| // don't load directly |
| /** | |
| * Add attachment metadata | |
| * | |
| * By default, WordPress only adds '_wp_attachment_metadata' metadata to images, audio and video files. | |
| * This hooks into 'wp_update_attachment_metadata' and sets 'file' to the value of '_wp_attached_file'. | |
| */ | |
| function prefix_update_attachment_metadata( $data, $post_id ) { | |
| // only set 'file' if needed | |
| if ( isset( $data['file'] ) ) { |