git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
//oauth2 auth | |
chrome.identity.getAuthToken( | |
{'interactive': true}, | |
function(){ | |
//load Google's javascript client libraries | |
window.gapi_onload = authorize; | |
loadScript('https://apis.google.com/js/client.js'); | |
} | |
); |
How To Use React-Intl: internationalize your React app
This short tutorial assumes you know about ES6 syntax.
yarn add react-intl
or npm i --save react-intl
.
This file should contain every message for your app.
It has an object of (locale, messages) couples:
/* | |
Removed useless info about the author - advertise yourself if you actually know what you're doing - THX! | |
Probably not one single bit is left from the original source, since Mister Advertiser actually ignored | |
all the different item-types. Kerikek (sleep is my copy-pasta of another copy-pasta ...∞) | |
So how to use this crap? | |
1. you don't need to load your inventory, but it would be a good idea to reload the site one time before you start | |
(your inventory site -> https://steamcommunity.com/my/inventory/) | |
2. open your developer-tools and go to console (maybe press F12) | |
3. paste this script to your console and execute it by hitting enter if you want to consume all your knick knacks |
Learning Rust
The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.
Warning
Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.
The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.
{ | |
"vim.showMarksInGutter": false, | |
"vim.foldfix": true, | |
"vim.surround": true, | |
"vim.easymotion": true, | |
"vim.easymotionKeys": "asdghklqwertyuiopzxcvbnmfj", | |
"vim.leader": "<space>", | |
"vim.normalModeKeyBindingsNonRecursive": [ | |
{ | |
"before": [":", "w", "<CR>"], |
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |