-
$ sudo pacman -S tor $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.
$ sudo pacman -S nyx
#!/bin/bash | |
# Path: /usr/bin/swap | |
function swap() { | |
if [ ! -f "$1" ] || [ ! -f "$2" ]; then return 1; fi | |
TMPFILE=/dev/shm/tmp.$$ | |
dd if="$1" of=$TMPFILE status=none bs=512K && \ | |
dd if="$2" of="$1" status=none bs=512K && \ | |
dd if=$TMPFILE of="$2" status=none bs=512K && \ | |
( \ | |
if [ $? -ne 1 ]; then true; else unlink $TMPFILE && unset $TMPFILE; return 1; fi; \ |
Tools to write: | |
- `require`: POSIX shell command line tool that evaluates a $1 input and checks that the supplied string is a callable binary given the inherited $PATH from the parent process, otherwise checks if the parent process's shell exposes the name as a builtin function. | |
- ... |
#!/usr/bin/env bash | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |
# SYMLINK_DIR= | |
if [ "$( env | grep -Ec "^SYMLINK_DIR=" )" -ne 1 ]; then | |
echo "SYMLINK_DIR is not set" | |
echo "Defaulting to $SCRIPT_DIR" | |
SYMLINK_DIR=$SCRIPT_DIR |
$ sudo pacman -S tor
$ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.
$ sudo pacman -S nyx
/* | |
* Hook main() using LD_PRELOAD, because why not? | |
* Obviously, this code is not portable. Use at your own risk. | |
* | |
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl' | |
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out' | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |
use leptos::html::Input; | |
use leptos::prelude::*; | |
use leptos::*; | |
use reactive_graph::{ | |
computed::{Memo, *}, | |
effect::Effect, | |
owner::StoredValue, | |
prelude::*, | |
signal::{signal, *}, | |
}; |
//! This crate contains various macros and functions for the Rust programming language. | |
#[macro_export] | |
macro_rules! runtime_globals { | |
( $($constant:meta => $value:meta $(; $fallback_value:expr )? $(,)? )* ) => { | |
$( | |
::paste::paste! { | |
#[::lazy_fn::lazy_fn] | |
fn [< lazy_fn_ $constant:lower >]() -> &'static str { |
#![feature(allocator_api, core_io_borrowed_buf, read_buf)] | |
#![allow(unused)] | |
#[rustfmt::skip] | |
use { | |
tmfalloc as tm, | |
std::{ | |
cmp, | |
io::{prelude::*, BorrowedRef, ErrorKind}, | |
path::Path, | |
}, |
#!/usr/bin/env python | |
import textwrap | |
from string import Template | |
def template(dir: str, full_pkg: str, ver: str = "0.1.0") -> str: | |
backslash = '\\' | |
backslash_newline = '\\n' | |
pkg_src = full_pkg + '_SOURCES=' + full_pkg + '.c' | |
it = textwrap.dedent('''\ | |
#!/bin/bash |