show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyAppWeb.ExampleLiveTest do | |
# `LiveviewCase` is a custom test helper - pretty much the same as ConnCase but with | |
# import Phoenix.LiveViewTest | |
# import MyApp.Support.AuthHelpers | |
use MyAppWeb.LiveviewCase, async: false | |
import MyApp.Factory | |
alias MyApp.Repo | |
alias MyAppWeb.ExampleLive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { setIn } from 'final-form'; | |
import { useMemo } from 'react'; | |
/** | |
* Sets the `innerError.message` in an `errors` object at the key | |
* defined by `innerError.path`. | |
* @param {Object} errors The object to set the error in. | |
* @param {{ path: string, message: string }} innerError A `yup` field error. | |
* @returns {Object} The result of setting the new error message onto `errors`. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= if assigns[:flash] && !assigns[:skip_flash] do %> | |
<%= render_flash(@flash) %> | |
<% end %> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Add AlpineJs to Tailwind UI | |
// @namespace http://tampermonkey.net/ | |
// @version 3.0 | |
// @description Add Alpine JS code to Tailwind Ui copy/paste | |
// @author https://gist.github.com/KevinBatdorf/8bd5f808fff6a59e100dfa08a7431822 | |
// @match https://tailwindui.com/components/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
Make sure that redis is running on localhost (or adjust the url) | |
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
pip install -u uvicorn | |
Install dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Repo.Migrations.AddPostgresTriggerAndFunctionForAllTables do | |
use Ecto.Migration | |
def up do | |
# Create a function that broadcasts row changes | |
execute " | |
CREATE OR REPLACE FUNCTION broadcast_changes() | |
RETURNS trigger AS $$ | |
DECLARE | |
current_row RECORD; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Migration do | |
@moduledoc """ | |
Additional helpers for PostgreSQL. | |
""" | |
import Ecto.Migration, only: [execute: 2] | |
defmacro __using__(_) do | |
quote do | |
use Ecto.Migration |
https://code.visualstudio.com/docs/languages/typescript#_typescript-extensions
- Angular v7 Snippets <- list of snippet in the same page
- TSLint View Vscode's typescript version https://stackoverflow.com/questions/39668731/what-typescript-version-is-visual-studio-code-using-how-to-update-it/39676463
- Angular Language Service edit template file
- https://research.kudelskisecurity.com/2017/06/07/installing-wireguard-the-modern-vpn/
- https://gist.github.com/nealfennimore/92d571db63404e7ddfba660646ceaf0d
- https://angristan.xyz/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
- https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
NB;
- the private IP address
192.168.3.XX
doesn't have to be an IP you own.
create a new vps/ip on ua cloud provider and check IP location on https://www.whatismyip.com/ip-address-lookup
NewerOlder