Create by @terrychan999 on 2021-Apr-30, feel free to share :)
-
Linux ENV: Ubuntu 20.04 Server
此教學僅在Ubuntu 20.04測試過
-
更新apt套件庫
sudo apt update && sudo apt upgrade
# This is an awful solution, but NodePath is missing an important method, so there's no great alternative that I've found. | |
# Try me with get_node_property(self, "Control/Spatial/CollisionShape2D:shape:extents:x") | |
func get_node_property(from: Node, path: NodePath): | |
assert ":" in path as String # Causes a hard crash | |
path = path as NodePath | |
var node_path = get_as_node_path(path) | |
var property_path = (path.get_concatenated_subnames() as NodePath).get_as_property_path() | |
return from.get_node(node_path).get_indexed(property_path) |
import axios from 'axios' | |
const tokenEl = document.getElementsByName('csrf-token')[0] | |
if (tokenEl) { | |
const token = tokenEl.getAttribute('content') | |
axios.defaults.headers.common['X-CSRF-Token'] = token | |
} | |
axios.defaults.headers.common['Accept'] = 'application/json' | |
axios.defaults.headers.post['Content-Type'] = 'application/json' |
<?php | |
$apiaccess =[ | |
"url" => "https://grocy.yourdomain.tld/api", | |
"key" => "1234password" | |
]; | |
$quantity_units = [ | |
"Cup" => [ | |
"name" => "Cup", | |
"description" => "", | |
"name_plural" => "Cups" |
This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!
First, add the ruby-openai gem! Needs to be at least version 4. Add Sidekiq too.
If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:
html {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 1.3em;
max-width: 40rem;
padding: 2rem;
margin: auto;
line-height: 1.5rem;
An guide how to activate Windows 11 Pro for free
Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet
The answer is yes! You can switch from almost any edition to Pro completely for free!
People which already have Pro, but not activated, can skip to this step.
What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:
import React, { useState, useEffect, useContext } from 'react' | |
import createAuth0Client from '@auth0/auth0-spa-js' | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname) | |
export const Auth0Context = React.createContext() | |
export const useAuth0 = () => useContext(Auth0Context) | |
let _initOptions |