Install the OpenSSL on Debian based systems
sudo apt-get install openssl
I have done some preliminary research into this bug and so far it does not seem like a backdoor. Just some really weird logic when handling routes, and rendering templates. | |
As to why widgetConfig[code] executes via a POST request, it is because of the following code located in /includes/vb5/frontend/applicationlight.php | |
$serverData = array_merge($_GET, $_POST); | |
if (!empty($this->application['handler']) AND method_exists($this, $this->application['handler'])) | |
{ | |
$app = $this->application['handler']; |
def extract(changeset) do | |
file_name = changeset.data.name | |
data = File.read!("#{@data_folder}/pages/#{file_name}") | |
case String.split(data, ~r/\n-{3,}\n/, parts: 2) do | |
[""] -> | |
%{frontmatter: nil, content: nil} | |
[frontmatter, content] -> | |
%{ | |
frontmatter: parse_yaml(frontmatter), | |
content: content |
I recently wanted to rename a model and its postgres table in a Phoenix app. Renaming the table was simple and documented, but the table also had constraints, sequences, and indexes that needed to be updated in order for the Ecto model to be able to rely on default naming conventions. I couldn't find any examples of what this would look like but was eventually able to figure it out. For anyone else in the same situation, hopefully this example helps.
In the example below, I'm renaming the Permission
model to Membership
. This model belongs to a User
and an Account
, so it has foreign key constraints that need to be renamed.
defmodule MyApp.Repo.Migrations.RenamePermissionsToMemberships do
use Ecto.Migration
events {} | |
http { | |
server { | |
listen 8080; | |
server_name a.com; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} |
server { | |
listen 443 ssl http2 proxy_protocol; | |
include /ssl.conf.include; | |
ssl_certificate /etc/nginx/certs/main.crt; | |
ssl_certificate_key /etc/nginx/certs/main.key; | |
server_name example.org; |
///////////////////////////////// | |
import React from "react" | |
import ReactDOM from 'react-dom' | |
let reducer = (state={count: 0}, action) => { | |
if (action.type === 'up') { | |
return { | |
...state, | |
count: state.count + 1 | |
} |
You'll need to include two pollyfils before you include a code with your custom elements:
• webcomponents/webcomponentsjs/custom-elements-es5-adapter.js - this is for new browsers in order to understand ES5 syntax
• webcomponents/custom-elements/custom-elements.min.js - this is for old browsers without customElements
support
You can add them to your index.html
file in the following way:
<div id="custom-elements-adapter">
const createMySocketMiddleware = (url) => { | |
return storeAPI => { | |
let socket = createMyWebsocket(url); | |
socket.on("message", (message) => { | |
storeAPI.dispatch({ | |
type : "SOCKET_MESSAGE_RECEIVED", | |
payload : message | |
}); | |
}); |
In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.
First, let's clarify what I mean by "The Elm Architecture".
The Elm Architecture's webpage describes it pretty well.