engine.ts
export class Engine {}
car.ts
// dm Klopapier Widget | |
// | |
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
/* | |
Simple wemos D1 mini MQTT example | |
This sketch demonstrates the capabilities of the pubsub library in combination | |
with the ESP8266 board/library. | |
It connects to the provided access point using dhcp, using ssid and pswd | |
It connects to an MQTT server ( using mqtt_server ) then: | |
- publishes "connected"+uniqueID to the [root topic] ( using topic ) |
cd ~ | |
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y | |
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases | |
#replace arch | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb | |
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb | |
apt --fix-broken install |
// Carbon | |
use Carbon\Carbon; | |
$visitorTraffic = PageView::select('id', 'title', 'created_at') | |
->get() | |
->groupBy(function($date) { | |
return Carbon::parse($date->created_at)->format('Y'); // grouping by years | |
//return Carbon::parse($date->created_at)->format('m'); // grouping by months | |
}); |
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
:
defmodule Blog.Attachment do | |
use Blog, :schema | |
@primary_key {:id, :binary_id, autogenerate: true} | |
@storage_path "attachments" | |
schema "attachments" do | |
field :file, :any, virtual: true | |
belongs_to :post, Post |