See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
// loading audio file "guitar.wav" | |
AudioFormatManager formatManager; | |
formatManager.registerBasicFormats(); | |
// normal way | |
File audioFile ("/path/to/guitar.wav"); | |
FileInputStream* input = audioFile.createInputStream(); | |
AudioFormatReader* reader = formatManager.createReaderFor (input); | |
// from the reader we can load into an audio buffer, etc... |
Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.
This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.
UPD: This manual now compatible with [email protected]. For older versions deployment, see revision history.
Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:
Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.
This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.
UPD: This manual now compatible with [email protected]. For older versions deployment, see revision history.
Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:
# Generated by Powerlevel10k configuration wizard on 2020-10-21 at 13:15 CEST. | |
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 49789. | |
# Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, dark, | |
# 24h time, angled separators, sharp heads, flat tails, 2 lines, dotted, no frame, | |
# sparse, many icons, concise, instant_prompt=quiet. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate | |
# your own config based on it. | |
# |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
Install Supervisor with sudo apt-get install supervisor
in Unix or brew install supervisor
in Mac OSX. Ensure it's started with sudo service supervisor restart
in Unix or brew services start supervisor
in Mac OSX.
In Unix in /etc/supervisord/conf.d/
create a .conf
file. In this example, laravel_queue.conf
(contents below). Give it execute permissions: chmod +x laravel_queue.conf
.
In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini
and in /usr/local/etc/supervisor.d/
create a .conf
file. In this example, laravel_queue.conf
(contents below). Give it execute permissions: chmod +x laravel_queue.conf
.
This file points at /usr/local/bin/run_queue.sh
, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh
.
Now update Supervisor with: sudo supervisorctl reread
in Unix and with: brew services restart supervisor
in MAc OSX . And start using those changes with: sudo supervisorctl update
.
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
jQuery(document).ready(function(){ | |
jQuery('#submit').click(function(e){ | |
e.preventDefault(); | |
jQuery.ajaxSetup({ | |
headers: { | |
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') | |
} | |
}); | |
jQuery.ajax({ |