Skip to content

Instantly share code, notes, and snippets.

@kborling
kborling / configuration.nix
Created December 24, 2021 23:59
NixOS Configuration (Sway/Wayland Enabled)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
@Intyre
Intyre / 1 - wahoo-create-maps.md
Last active June 26, 2022 22:37
Wahoo create maps

Wahoo map creation

Tools

  • Java
    • set JAVACMD_OPTIONS="-Xmx2g" or other memory size when osmosis starts to complain.
  • [osmium][12] for filtering and splitting .pbf files
  • [osmosis][1] for splitting .pbf and creating .map files
    • [mapsforge-map-writer][9] plugin for osmosis to create .map files
  • [osmfilter][2] for filtering pois and ways
  • [osmconvert][3] for converting .pbf and .o5m files
#!/bin/bash
echo "Install Imgproxy for Centos7";
cd $HOME;
# Install and enable the EPEL RPM package on Amazon Linux 2
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y;
# Install the Remi repository configuration package
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y;
@rmoriz
rmoriz / desc.md
Last active October 25, 2023 12:21
WireGuard Key Generation (wg genkey)

wg genkey / pubkey

wg genkey
qJvFeHHuffBaPWx4veJGQqXw6j5zdo5cSOaBd1Z0Km4=


echo 'qJvFeHHuffBaPWx4veJGQqXw6j5zdo5cSOaBd1Z0Km4=' | wg pubkey
knL56pMLtyQVyZXOd9m2vEeOopPtbv4tMSU0ctBvGQo=
@m-rey
m-rey / install_keybase.sh
Created November 19, 2018 16:34
Install keybase on openSUSE
#!/bin/sh
# taken from Matthew S. Dippel's blog:
# http://matthewdippel.blogspot.com/2018/10/howto-install-keybase-on-opensuse.html
# import package signature
TMFILE="$(mktemp)"
curl https://keybase.io/docs/server_security/code_signing_key.asc > "$TMFILE"
sudo rpm --import "$TMFILE"
rm "$TMFILE"
@bigspawn
bigspawn / download-from-facecast.md
Last active April 28, 2024 12:18
How download video from facecast.net
@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@liufuyang
liufuyang / tailc
Last active April 15, 2024 02:31
Color output of linux tail command
#!/bin/bash
# save this file as tailc then
# run as: $ tailc logs/supplier-matching-worker.log Words_to_highlight
file=$1
if [[ -n "$2" ]]; then
color='
// {print "\033[37m" $0 "\033[39m"}
/(WARN|WARNING)/ {print "\033[1;33m" $0 "\033[0m"}
/(ERROR|CRIT)/ {print "\033[1;31m" $0 "\033[0m"}
@mikoim
mikoim / README.md
Last active June 19, 2024 21:53
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264