Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} |
<?php | |
return [ | |
"fas fa-ad" => "Ad", | |
"fas fa-address-book" => "Address book", | |
"fas fa-address-card" => "Address card", | |
"fas fa-adjust" => "Adjust", | |
"fas fa-air-freshener" => "Air freshener", | |
"fas fa-align-center" => "Align center", | |
"fas fa-align-justify" => "Align justify", |
# frozen_string_literal: true | |
# Creates a new blob on the server side in anticipation of a direct-to-service upload from the client side. | |
# When the client-side upload is completed, the signed_blob_id can be submitted as part of the form to reference | |
# the blob that was created up front. | |
class ActiveStorage::DirectUploadsController < ActiveStorage::BaseController | |
skip_before_action :verify_authenticity_token, :only => [:create] | |
def create | |
blob = ActiveStorage::Blob.create_before_direct_upload!(blob_args) |
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
[ | |
{currency: 'Afghan Afghani', code: 'AFN'}, | |
{currency: 'Albanian Lek', code: 'ALL'}, | |
{currency: 'Algerian Dinar', code: 'DZD'}, | |
{currency: 'Angolan Kwanza', code: 'AOA'}, | |
{currency: 'Argentine Peso', code: 'ARS'}, | |
{currency: 'Armenian Dram', code: 'AMD'}, | |
{currency: 'Aruban Florin', code: 'AWG'}, | |
{currency: 'Australian Dollar', code: 'AUD'}, | |
{currency: 'Azerbaijani Manat', code: 'AZN'}, |
A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg
.
FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.
To list all global metadata tags for a media file, just set an input but no output file.
require 'pry' | |
require 'json' | |
require 'uri' | |
module Application | |
class NginxLogParser | |
DEFAULT_FORMAT_REGEXP = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s?\-\s?-\s?\[(\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\]\s?\\?"?(GET|POST|PUT|HEAD|DELETE|OPTIONS)\s?(.*?)\s(HTTP\/\d\.\d)\\?"?\s?(\d{3})\s?(\d+)\s?\\?\"\-\\?\"\s?\\?\"(.*?)\"/i | |
REQUEST_FORMAT = [ |
page '/podcast.xml', layout: false | |
# Methods defined in the helpers block are available in templates | |
helpers do | |
def podcast_source_path(article) | |
"source/audio/#{article.data.file}" | |
end | |
end |