Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittest with DocTests."""
import doctest
import unittest
@titenkov
titenkov / vim-visual-blocks.md
Last active May 13, 2024 12:17
Use Vim visual blocks during interactive git rebase

Sometimes, when rebasing interactively with git, we need to squash a sequence of commits in a branch.

For example, we need to transform this:

pick 0253dc894f bumped
pick 5a1e86933c remove dependency
pick bffoffb395 memberships rpc resource
pick 222fabf5e0 rpc membership service
pick 726a2f9a10 remove crypto logic
@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active May 13, 2024 12:15
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue/Angular) apps
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@PeterTheOne
PeterTheOne / plz-coord-austria.csv
Created August 17, 2016 16:09
PLZ coordinates austria, August 2016, Geocoded with OSM
9163 Unterbergen K 01.01.1966 PLZ-Adressierung extern Ja Nein 46.4781017 14.2559153 225
9135 Bad Eisenkappel K 01.01.1966 PLZ-Adressierung extern Ja Ja 46.4812105646964 14.6062427452371 225
9170 Ferlach K 01.01.1966 PLZ-Adressierung extern Ja Ja 46.5253656509035 14.3104077671798 225
9182 Maria Elend K 01.01.1966 PLZ-Adressierung extern Ja Nein 46.5298704238434 14.0761492080012 225
9181 Feistritz im Rosental K 01.01.1966 PLZ-Adressierung extern Ja Ja 46.5322359733192 14.1353740987715 225
9183 Rosenbach K 01.01.1966 PLZ-Adressierung extern Ja Nein 46.5364895720495 14.0376219311205 225
9162 Strau K 01.01.1966 PLZ-Adressierung extern Ja Ja 46.538069 14.263217 225
9173 St. Margareten im Rosental K 01.01.1966 PLZ-Adressierung extern Ja Nein 46.5424186613725 14.4066575369548 225
9602 Thörl-Maglern K 01.01.1966 PLZ-Adressierung extern Ja Ja 46.5432506251966 13.6473041244356 225
9072 Ludmannsdorf K 01.01.1966 PLZ-Adressierung extern Ja Nein 46.5434291311274 14.1433352631987 225
@younesbelkada
younesbelkada / finetune_llama_v2.py
Last active May 13, 2024 12:11
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@marcelosomers
marcelosomers / git-php-webhook.php
Last active May 13, 2024 12:10
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@genakolechenkov
genakolechenkov / webos-aid-patcher.rs
Created May 13, 2024 12:07 — forked from kitsuned/webos-aid-patcher.rs
Bypass App ID assertion in appinstalld on webOS Signage TV
use std::{
fs,
fs::File,
io::{BufRead, BufReader},
os::raw::c_void,
path::{PathBuf},
};
use goblin::elf::Elf;
use nix::{