Skip to content

Instantly share code, notes, and snippets.

@drkarl
drkarl / README.md
Last active December 14, 2024 16:12 — forked from disler/README.md
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 30, 2024 19:38
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@drkarl
drkarl / .taskrc
Last active April 2, 2022 13:08
How to add Jira tasks to taskwarrior and open browser from command line
#Add to .taskrc
#New UDA jira
uda.jira.type=string
uda.jira.label=Jira
#Add the new UDA to any existing or new report, i.e. to the next report
report.next.columns=id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.remaining,until.remaining,jira,description,urgency
report.next.labels=ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Jira,Description,Urg

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everyday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

" vimrc.vim - Extension of vim-sensible plugin with less sensible defaults.
" Maintainer: Adam Stankiewicz <sheerun@sher.pl>
" Version: 2.0
if exists("g:loaded_vimrc") || &cp
finish
else
let g:loaded_vimrc = 1
end
@drkarl
drkarl / maven tips.sh
Last active November 6, 2018 10:54 — forked from kra3/maven tips.sh
Speed up maven build times.
# rip off from https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/
# in .bashrc
set MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
# add -DdependencyLocationsEnabled=false to retain fewer outgoing connections.
# compile all modules
mvn -T 1C install -offline
#Copy to your .zshrc
#Copy to clipboard
function cp(){
echo $1 > /dev/clipboard
}
#Paste from clipboard
function pb(){
cat /dev/clipboard
@drkarl
drkarl / hardening_usbarmory.md
Created April 13, 2018 08:44 — forked from yann2192/hardening_usbarmory.md
Hardening USB Armory

Hardening the USB Armory

As a good crypto nerd, I usually use an entirely encrypted linux FS: / but also /boot using grub LUKS support. It's a good setup but it's not perfect, the BIOS and the bootloader are not protected.

I recently got a USBArmory and I wanted to apply the same (or a better) setup.

I found some useful links but no clear howto. So this is my setup.

@drkarl
drkarl / font.sh
Created August 3, 2017 11:31 — forked from kepbod/font.sh
Installing font for powerline
#!/usr/bin/env bash
printf '\033[0;34m%s\033[0m\n' "Installing font for statusline..."
mkdir $HOME/.fonts
wget -O $HOME/.fonts/PowerlineSymbols.otf https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf
fc-cache -vf $HOME/.fonts
mkdir $HOME/.fonts.conf.d
wget -O $HOME/.fonts.conf.d/10-powerline-symbols.conf https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf