The configs below are all seperated. Pick what you need, theres a sample script at the bottom.
- Set Timezone and Locale: Configure the system's timezone and locale to match your geographic location and preferred language settings.
timezone: "Etc/UTC"| #cloud-config | |
| # Enable automatic package updates and upgrades during cloud-init execution | |
| package_update: true | |
| package_upgrade: true | |
| packages: | |
| # Security and Hardening | |
| - ufw | |
| - fail2ban |
The configs below are all seperated. Pick what you need, theres a sample script at the bottom.
timezone: "Etc/UTC"Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal.
sudo journalctl --disk-usage| " Specify a directory for plugins | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
| Plug 'scrooloose/nerdtree' | |
| "Plug 'tsony-tsonev/nerdtree-git-plugin' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
| Plug 'ryanoasis/vim-devicons' | |
| Plug 'airblade/vim-gitgutter' |
This is my process for addint ESLint and Prettier support for a new Pulumi TypeScript project.
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier| #[test] | |
| fn iter_demo() { | |
| let v1 = vec![1, 2, 3]; | |
| let mut v1_iter = v1.iter(); | |
| // iter() returns an iterator of slices. | |
| assert_eq!(v1_iter.next(), Some(&1)); | |
| assert_eq!(v1_iter.next(), Some(&2)); | |
| assert_eq!(v1_iter.next(), Some(&3)); | |
| assert_eq!(v1_iter.next(), None); |
| import 'dart:convert'; | |
| Map<String, dynamic> parseJwt(String token) { | |
| final parts = token.split('.'); | |
| if (parts.length != 3) { | |
| throw Exception('invalid token'); | |
| } | |
| final payload = _decodeBase64(parts[1]); | |
| final payloadMap = json.decode(payload); |
| import 'package:flutter/material.dart'; | |
| import 'package:transparent_image/transparent_image.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979