Skip to content

Instantly share code, notes, and snippets.

@freemed
freemed / ppa_publish.sh
Created July 11, 2011 18:04
PPA multiple distribution publishing script
#!/bin/bash
# Build and publish Ubuntu/Debian source packages for several releases
# without manually editing debian/changelog each time
#
# Written by TJ <ubuntu@tjworld.net> July 2008
#
if [ $# -eq 0 ]; then
echo -e "\nUsage: $(basename $0) dput-ppa release-a [[release-b] [release-c]]\n"
echo -e " \tE.g. $(basename $0) my-ppa gutsy hardy intrepid\n"
echo "Edits the changelog before calling debuild and dput to publish"
@PhirePhly
PhirePhly / memdjpeg.c
Created July 10, 2012 02:33
A bare-bones example of how to use jpeglib to decompress a jpg in memory.
// memdjpeg - A super simple example of how to decode a jpeg in memory
// Kenneth Finnegan, 2012
// blog.thelifeofkenneth.com
//
// After installing jpeglib, compile with:
// cc memdjpeg.c -ljpeg -o memdjpeg
//
// Run with:
// ./memdjpeg filename.jpg
//
@Zehkul
Zehkul / Convert Script – README.md
Last active December 16, 2023 07:19
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@skeeto
skeeto / jit.c
Last active September 27, 2023 11:27
Basic JIT
/* http://redd.it/2z68di */
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#define PAGE_SIZE 4096
@deepak1556
deepak1556 / command.sh
Created October 30, 2015 09:27
Simple electron app to test pepper plugin load
#!/bin/bash
g++ ./hello.cc -shared -o libppapi_hello.so -I/home/robo/github/nacl_sdk/pepper_43/include -L/home/robo/github/nacl_sdk/pepper_43/lib/linux_host/Release -lppapi_cpp -lppapi -lpthread -Wall -fPIC
@erincerys
erincerys / create-memtest-usb.sh
Created December 21, 2015 00:39
Prepare a USB flash drive with syslinux and memtest86+ for RAM testing
#!/bin/bash
# Install dependencies for creating filesystem and installing bootloader
## This script is mostly system-independent, except for this part. Replace yaourt and the args with your own package manager
yaourt -S --noconfirm mtools syslinux dosfstools
# Plug in the flash drive, and find its device. Don't mount it.
lsblk
while [[ $(echo $FLASHDEV | grep -c \/dev\/sd[a-z]) -lt 1 && -b "$FLASHDEV" ]] ; do
read -p 'Which device (e.g. /dev/sdf)? ' FLASHDEV
#!/bin/bash
# Anh Nguyen <anh.ng8@gmail.com>
# 2016-04-30
# MIT License
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg.
# Make sure you have ffmpeg installed before running.
# The output command looks something like the below, but for as many images as you have in the folder.

Introduction

This table shows the current implementation status of several multimedia fomats by popular tools and browsers. All tests were run with the latest available version, or git HEAD for open source software.

Symbols mean

  • ✅ fully supported
  • ❗ unsupported
  • 💭 work in progress
  • 1️⃣️ see notes
@avih
avih / context.lua
Created February 2, 2017 14:07
flexible mpv context menu using Tcl/Tk, for Windows too!
--[[ *************************************************************
* Context menu for mpv using Tcl/Tk. Mostly proof of concept.
* Avi Halachmi (:avih) https://github.com/avih
*
* Features:
* - Simple construction: ["<some text>", "<mpv-command>"] is a complete menu item.
* - Possibly dynamic menu items and commands, disabled items, separators.
* - Possibly keeping the menu open after clicking an item (via re-launch).
* - Hacky pseudo sub menus. Really, this is an ugly hack.
* - Reasonably well behaved/integrated considering it's an external application.
@mosquito
mosquito / README.md
Last active July 24, 2024 14:40
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service