Skip to content

Instantly share code, notes, and snippets.

@kostaz
kostaz / install-ripgrep-on-ubuntu.sh
Created Sep 21, 2018 — forked from niftylettuce/UPDATE.md
Install ripgrep on Ubuntu
View install-ripgrep-on-ubuntu.sh
#!/bin/bash
[[ $UID == 0 ]] || { echo "run as sudo to install"; exit 1; }
REPO="https://github.com/BurntSushi/ripgrep/releases/download/"
RG_LATEST=$(curl -sSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq --raw-output .tag_name)
RELEASE="${RG_LATEST}/ripgrep-${RG_LATEST}-x86_64-unknown-linux-musl.tar.gz"
TMPDIR=$(mktemp -d)
cd $TMPDIR
wget -O - ${REPO}${RELEASE} | tar zxf - --strip-component=1
@kostaz
kostaz / README.md
Created Oct 28, 2017 — forked from ReSTARTR/README.md
ZeroMQ sample in Go and Python. (with MonitoredQueue)
View README.md

Versions

  • zeromq: stable 3.2.2
  • go: 1.0.3
    • gozmq: zmq_3_x
  • python: 2.7.3
    • pyzmq: 13.0.2

Usage

@kostaz
kostaz / gist:6ce4034192ac3a0f08ec3e279c81d0b8
Created Apr 23, 2017 — forked from naodesu/gist:10620506
How to mount ubifs image in Linux.
View gist:6ce4034192ac3a0f08ec3e279c81d0b8
# $UBIFS is ubifs image file
# make sure $IMAGE is a ubifs image file
blkid $(IMAGE)
$(IMAGE): ... TYPE="ubifs"
# size of created mtd is 256.0 MiB
modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
flash_erase /dev/mtd0 0 0
ubiformat /dev/mtd0 -s 2048 -O 2048
modprobe ubi
@kostaz
kostaz / splitpatch.rb
Created Nov 8, 2012 — forked from bcachet/splitpatch.rb
Script to split a unified patch file into several ones
View splitpatch.rb
#!/usr/bin/env ruby
#
# splitpatch is a simple script to split a patch up into multiple patch files.
# if the --hunks option is provided on the command line, each hunk gets its
# own patchfile.
#
# Copyright (C) 2007, Peter Hutterer <peter@cs.unisa.edu.au>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by