Skip to content

Instantly share code, notes, and snippets.

# Custom history configuration
# Run script using:
# chmod u+x better_history.sh
# sudo su
# ./better_history.sh
echo ">>> Starting"
echo ">>> Loading configuration into /etc/bash.bashrc"
echo "HISTTIMEFORMAT='%F %T '" >> /etc/bash.bashrc
echo 'HISTFILESIZE=-1' >> /etc/bash.bashrc
@jgonet
jgonet / conky.rc
Created April 23, 2018 19:47
My conky conf
conky.config = {
double_buffer = true,
alignment = 'top_right',
background = true,
border_width = 0,
cpu_avg_samples = 2,
default_color = 'ffffff',
default_outline_color = '000000',
default_shade_color = 'ffffff',
draw_borders = false,
@ShadowRZ
ShadowRZ / README.md
Last active June 3, 2019 03:14
布偶君的50条
  1. 这是我的50条,它不是严格按时间顺序排列的!
  2. ~~首先就是:~~我叫布偶君(可以随意添加前缀)
  3. 另称 ShadowRZ / HID_System
  4. 以上两个名字都是随便起的
  5. 略宅
  6. 经常感觉无事可做
    • 因此觉得自己比咸鱼还咸鱼、比萌新还萌新
  7. 是个学生
  8. 一直在用 Firefox
  9. 人家喜欢这种排版😣
@RichardBronosky
RichardBronosky / 0-TLDR.md
Last active February 10, 2025 19:20 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

User 1

remote_server=172.31.0.1
git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/ > /tmp/git-serve.log 2>&1 &
ssh -R 9418:localhost:9418 ec2-user@$remote_server
git clone git://localhost/ local-repo-name

Repo from workstation is cloned onto server.

User 2

@dusenberrymw
dusenberrymw / 1.rsync_tips_and_tricks.md
Last active December 20, 2022 13:27
Rsync Tips & Tricks

Rsync Tips & Tricks

  • rsync -auzPhv --delete --exclude-from=rsync_exclude.txt SOURCE/ DEST/ -n
    • -a -> --archive; recursively sync, preserving symbolic links and all file metadata
    • -u -> --update; skip files that are newer on the receiver; sometimes this is inaccurate (due to Git, I think...)
    • -z -> --compress; compression
    • -P -> --progress + --partial; show progress bar and resume interupted transfers
    • -h -> --human-readable; human-readable format
    • -v -> --verbose; verbose output
  • -n -> --dry-run; dry run; use this to test, and then remove to actually execute the sync
@ageis
ageis / systemd_service_hardening.md
Last active May 14, 2025 22:12
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@hostilefork
hostilefork / listener.c
Last active May 16, 2025 03:20
Simple listener and sender for UDP multicast
//
// Simple listener.c program for UDP multicast
//
// Adapted from:
// http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/example.html
//
// Changes:
// * Compiles for Windows as well as Linux
// * Takes the port and group on the command line
//
@Hengjie
Hengjie / tutorial.md
Last active April 20, 2025 10:31
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

@manasthakur
manasthakur / plugins.md
Last active January 17, 2025 13:17
Managing plugins in Vim

Managing plugins in Vim: The basics

Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo. First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git) or simply downloading it as a zip (from its GitHub page).

Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim directory by default). For example, if the layout of a plugin foo is as follows:

foo/autoload/foo.vim
foo/plugin/foo.vim