The script uses zramctl under the hood
make sure to remove swap partition from /etc/fstab
| # Arch Linux Archive tool | |
| # Use to fix local pacman mirrorlist to point to a specific snapshot | |
| # You have to update the pacman.conf file to use the ala-mirrorlist | |
| function ala | |
| switch "$argv[1]" | |
| case today | |
| # Sync to today's snapshot | |
| __ala_update_snapshot "$(date +"%Y/%m/%d")"; | |
| case set | |
| # Sync to a specific snapshot |
| " PLUGINS ------------------------------------------------------ {{{ | |
| " set nocompatible | |
| " filetype off | |
| call plug#begin() | |
| Plug 'kovetskiy/sxhkd-vim' | |
| Plug 'catppuccin/vim', { 'as': 'catppuccin' } | |
| Plug 'rstacruz/sparkup' | |
| Plug 'wakatime/vim-wakatime' | |
| Plug 'Exafunction/codeium.vim' |
| ;#--------------------- | |
| ;# GNU Assembler file | |
| ;# Function calls demo | |
| ;#--------------------- | |
| .intel_syntax noprefix | |
| .global _start | |
| .text | |
| _start: | |
| mov rbp, rsp | |
| mov rdi, 5 |
| #!/usr/bin/bash | |
| # Simple bash script to copy files into clipboard using xclip | |
| # Check if xclip is installed | |
| if ! command -v xclip &> /dev/null; then | |
| echo "Error: xclip is not installed. Please install xclip before running this script." | |
| exit 1 | |
| fi | |
| if [[ -z "$1" ]]; then |
| class User { | |
| private $id; | |
| private $name; | |
| private $email; | |
| public function __construct(int $id, string $name, string $email) { | |
| $this->id = $id; | |
| $this->name = $name; | |
| $this->email = $email; | |
| } |
| const express = require('express'); | |
| const multer = require('multer'); | |
| const { v4: uuidv4 } = require('uuid'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const Resource = require('./models/Resource'); // Assuming you have a Resource model defined | |
| const app = express(); | |
| // Set up multer storage configuration |
| #!/usr/bin/env bash | |
| # Use rclone to mount a shared google drive directory into my disk. | |
| # | |
| # Assumed you already created a readonly gdrive rclone config. | |
| # Assumed you already added your access token or you authenticated the rclone config with your drive. | |
| # Check the rclone docs for more info: https://rclone.org/drive/ | |
| # You don't have to assign everything, usually I leave everything empty and I use my browser to authenticate. | |
| # the rclone config name | |
| rclone_config_name="EmbeddedLinuxDiploma" |
| import 'dart:async'; | |
| typedef EventHandler<E> = void Function(E event); | |
| typedef HandlerCanceler = Future<void> Function(); | |
| class EventEmitter<T> { | |
| final StreamController<T> _controller = StreamController.broadcast(); | |
| final List<StreamSubscription> _subscriptions = []; | |
| final List<Completer> _completers = []; |
| import 'middleware.dart'; | |
| void main(List<String> arguments) { | |
| final password = MiddlewareManager<String, String>(); | |
| password.use((context, next, fail) { | |
| if (context.isEmpty) fail('password is required'); | |
| next(context); | |
| }); | |
| password.use((context, next, fail) { | |
| if (context.length < 8) fail('password minimum 8 characters'); |