Skip to content

Instantly share code, notes, and snippets.

@hyperupcall
hyperupcall / settings.jsonc
Last active May 3, 2024 12:52
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@Hellisotherpeople
Hellisotherpeople / blog.md
Last active May 4, 2024 01:57
You probably don't know how to do Prompt Engineering, let me educate you.

You probably don't know how to do Prompt Engineering

(This post could also be titled "Features missing from most LLM front-ends that should exist")

Apologies for the snarky title, but there has been a huge amount of discussion around so called "Prompt Engineering" these past few months on all kinds of platforms. Much of it is coming from individuals who are peddling around an awful lot of "Prompting" and very little "Engineering".

Most of these discussions are little more than users finding that writing more creative and complicated prompts can help them solve a task that a more simple prompt was unable to help with. I claim this is not Prompt Engineering. This is not to say that crafting good prompts is not a difficult task, but it does not involve doing any kind of sophisticated modifications to general "template" of a prompt.

Others, who I think do deserve to call themselves "Prompt Engineers" (and an awful lot more than that), have been writing about and utilizing the rich new eco-system

@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active April 16, 2024 04:20
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
patch file to implement workaround from https://github.com/oracle/vagrant-boxes/issues/178
--- /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/driver/meta.rb.orig 2019-10-14 12:01:06.000000000 -0500
+++ /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/driver/meta.rb 2020-01-18 14:17:54.000000000 -0600
@@ -64,6 +64,7 @@
"5.1" => Version_5_1,
"5.2" => Version_5_2,
"6.0" => Version_6_0,
+ "6.1" => Version_6_1,
}
@darrenldl
darrenldl / ubuntu_luks_keyfile_guide.md
Last active July 14, 2023 17:18
Ubuntu keyfile boot

Ubuntu LUKS keyfile guide

Goal

We want to be able to set up an encrypted Ubuntu installation where we can unlock using just an external USB key without entering any passwords

We do not consider evil maid attacks in this case, and are only worried about data leak

We also assume USB key is kept securely, thus we are not concerned with USB key not being encrypted

@shadyvb
shadyvb / VagrantFile
Last active March 31, 2024 17:07
VagrantFile hack to auto-create ssh-config entries for vagrant machines
Vagrant.configure("2") do |config|
config.trigger.after :up,
name: "Caching vagrant ssh-config for '#{CONF['hosts'].join('\' and \'')}'",
ruby: proc{|env,machine| puts `mkdir ~/.ssh/config.d &>/dev/null; vagrant ssh-config | sed 's/Host default/Host #{CONF['hosts'].join(" ")}/' | tee ~/.ssh/config.d/vagrant-#{CONF['hosts'][0]} >/dev/null; bash -c "if ! grep -q 'Include ~/.ssh/config.d/*' ~/.ssh/config; then echo '> Please add the following line to your ~/.ssh/config file: Include ~/.ssh/config.d/*'; fi"`}
end
@Qix-
Qix- / ohai.gif
Last active October 16, 2023 16:04
ohaider
ohai.gif
@fnky
fnky / ANSI.md
Last active May 9, 2024 04:58
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27