Skip to content

Instantly share code, notes, and snippets.

@flying-sheep
flying-sheep / compile-ffmpeg.sh
Last active June 24, 2017 14:39
Compiling ffmpeg to ~/.local
(
cd x264-snapshot-*
./configure --prefix=$HOME/.local --disable-opencl
)
(
cd ffmpeg-*
PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig" ./configure \
--prefix=$HOME/.local \
#--bindir=$HOME/.local/bin \
--extra-cflags="-I$HOME/.local/include" \
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
#needs jq and xmlstarlet
rdfns='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
emns='http://www.mozilla.org/2004/em-rdf#'
main() {
echo -e 'Name\tCompatible\tinstall.rdf\tmanifest.json\tPath'
#!/bin/zsh
zmodload zsh/mathfunc
local usage="Usage: ${0##*/} [-p lastpage] PDF"
local -a help pages
zparseopts -D h=help -help=help p:=pages
if (( ! $# )); then
@flying-sheep
flying-sheep / disk-status.sh
Created May 15, 2017 19:42
Checks if your disks are in standby or not
for disk in /dev/sd?; do
if sudo smartctl -q silent -i -n standby "$disk"; then
echo "$disk active"
else
echo "$disk standby"
fi
done
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flying-sheep
flying-sheep / unpack.r
Last active May 8, 2017 13:41
R unpacking operator
#' Unpack a list
#'
#' Assigns variables in the environment \code{pos} that are extracted from \code{values}
#'
#' @param extraction A \code{\link{list}(val1, name = val2)} expression where values represent variable names to assign to
#' and (optional) names represent list elements to extract from \code{values}. A missing name means that
#' both variable name and extracted list element name are identical.
#' @param values A named list containing values to extract.
#' @param pos An environment or stack reference referring to one (see \code{\link{assign}}).
#' @return TRUE if all list members were extracted, else FALSE
# Maintainer: Fabian Zaremba <[email protected]>
pkgname=jupyterlab-git
pkgver=0.6.0.r1827.g5325744bc
pkgrel=1
pkgdesc="A pre-alpha Jupyter lab environment notebook server extension."
url="http://jupyter.org"
depends=('python' 'jupyter>=4.1.0-5')
makedepends=('python3' 'npm' 'lerna')
license=('BSD')
@flying-sheep
flying-sheep / PKGBUILD
Last active April 5, 2017 14:31
pyjnius split package PKGBUILD
pkgbase=pyjnius
pkgname=(python2-$pkgbase python-$pkgbase)
pkgver=1.1.1
pkgrel=1
pkgdesc='Python module to access Java class as Python class, using JNI.'
arch=(any)
url="https://github.com/kivy/$pkgbase"
license=(LGPL3)
source=("$pkgbase-$pkgver.tar.gz::https://github.com/kivy/$pkgbase/tarball/$pkgver")
md5sums=(2d457e4761b27e6760cf54efb6201f17)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.