Skip to content

Instantly share code, notes, and snippets.

@trnila
trnila / cmd_not_found.sh
Created February 2, 2017 16:52
Install package that is not found in Archlinux with packer
#!/bin/bash
query=$1
options=$(packer -Ss "$query" | awk -f <(cat - <<-'EOD'
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
/^[^ ]/ {
printf("\"%s\" ", $1);
desc=1;
}
/^ / {
@trnila
trnila / Makefile
Last active July 26, 2016 00:45
Openwrt BUP package
# https://groups.google.com/d/msg/bup-list/HIeue2eiIKc/slcMnIywtoMJ
include $(TOPDIR)/rules.mk
PKG_NAME:=bup
PKG_VERSION:=0.28.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/bup/bup/archive/
@trnila
trnila / main.c
Created February 29, 2016 22:51
fork
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
int main() {
int mypipe[2];
pipe(mypipe);