Skip to content

Instantly share code, notes, and snippets.

View themightyoarfish's full-sized avatar

Rasmus themightyoarfish

  • PSIORI
  • Germany
View GitHub Profile
@rain-1
rain-1 / LLM.md
Last active May 22, 2024 08:18
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@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'
@madduci
madduci / ftth_openwrt.md
Last active May 4, 2024 23:05
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username:
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 23, 2024 07:35
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@jokkebk
jokkebk / White balance.ipynb
Created August 17, 2019 11:34
Correcting image white balance with Python PIL and Numpy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@koshatul
koshatul / README.md
Last active April 29, 2024 17:13
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@royshil
royshil / copy_tf_headers.sh
Last active January 21, 2020 08:01
A script to copy Tensorflow headers to build custom C++ applications
#!/bin/bash
# inspired by a part of: https://github.com/cjweeks/tensorflow-cmake/blob/master/build.sh
#
# Assumes Tensorflow libraries libtensorflow_framework.so and libtensorflow_cc.so were built with Bazel,
# and the ${TF_ROOT}/tensorflow/contrib/makefile/download_dependencies.sh script was executed.
set -o nounset
set -o errexit
set -o pipefail
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@sglyon
sglyon / eigen_xtensor_buf.cpp
Last active October 24, 2023 15:11
xtensor buffer adaptor for eigen VectorXd and MatrixXd
#include <stdexcept>
#include "xtensor/xarray.hpp"
#include "xtensor/xio.hpp"
#include "xtensor/xbuffer_adaptor.hpp"
#include "Eigen/Dense"
auto to_xarray(Eigen::VectorXd& in) {
using buf = xt::xbuffer_adaptor<double>;
using xbuf_arr = xt::xarray_container<buf, xt::layout_type::column_major, std::vector<std::size_t>>;