Skip to content

Instantly share code, notes, and snippets.

View spvkgn's full-sized avatar

spvkgn

  • Russia
View GitHub Profile
@bradleyayers
bradleyayers / gist:1660182
Created January 23, 2012 02:59
Save to `/etc/dbus-1/system.d/Upstart.conf` to enable Upstart user jobs
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only the root user can own the Upstart name -->
<policy user="root">
<allow own="com.ubuntu.Upstart" />
</policy>
@rayantony
rayantony / README.md
Last active April 8, 2017 14:50
bash-imagemagick-useful-tricks-not-hacks

ImageMagick in Bash/Console : Not all 'Tricks' necessitate using the word 'Hack' (so lets cool it on that shit ok?)

For many of these, I have created a sort of framework(s) around the standard IM commands to ease in modularization. So quickly do our Im strings vanish from memory or clumsily integrate into a million other things, I'm taking some steps to make them easy to use and share if only in a linux/ubuntu environment.

As well many of these are coded from the start to be able to take multiple file types where applicable, as well 'x' number of them via spaced command line params or selecting large groups of files with the mouse to convert which is often the objective but virtually never coded for in Linux/Bash and virtually unpublished and unpracticed in Dos/Windows. The compression isnt much mystery but this modularization and scaling of input/outputs is a common feature

@hydra1983
hydra1983 / ssh-tunnel
Last active May 2, 2018 09:26
script to start a ssh tunnel using autossh on ubuntu
#! /bin/sh
#
# Author: Edison <hydra1983@gmail.com>
#
# This is a modified version for from Andreas Olsson <andreas@arrakis.se>
# For each tunnel; make a uniquely named copy of this template.
## SETTINGS
#
# autossh monitoring port (unique)
@xiaods
xiaods / tiny-rss-openshift-setup.md
Last active January 2, 2019 17:06
Google reader have gone, Setting Up Your Free Private Feed Reader.使用OpenShift的免费空间,配合Tiny-Tiny-Rss直接部署一个在线版的Rss Reader,经试用,支持中文挺好的。
  1. 下载tiny-tiny-rss source code
cd ~/src/git 
clone git://github.com/gothfox/Tiny-Tiny-RSS.git
  1. 创建openshift空间
@jasongardnerlv
jasongardnerlv / mybeetsconfig
Last active April 27, 2019 12:56
Tame your music collection with Beets (orig blog post)
I've finally tamed my large MP3 collection using the awesome open source utility called Beets. That, along with a few other utilities and scripts, have allowed me easily clean up my existing library, import new music, sync with my Android phone, and then playback on my computer with an extremely simple but powerful query language.
Firstly, let's talk about the parameters for which I was seeking a solution:
Command line interface - Ideally, I should be able to use the solution on any OS platform without needing more than a Bash environment and some Unix utilities. Also, with each cog in the machine being a Bash utility/script, it will make it easy to shim/pipe/redirect to other utilities to facilitate any other integrations I can dream up.
Minimal data outside of the MP3 files - I'd like as much of the MP3 data to be stored in the MP3 files themselves. A small metadata database file is ok, if it only contains duplicate information (non-volatile) and is stored with the collection, for easy backing up.
Fix M
@DroidFreak32
DroidFreak32 / flac2opus
Last active October 4, 2019 15:56 — forked from keeferrourke/flac2opus
This is a script to convert all flac files in a given directory to ogg/opus. I wrote this because mp3 kinda sucks and opus is a free format that is pretty much taking over the internet.
#!/bin/bash
# Copyright 2017 Keefer Rourke <mail@krourke.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCNUMBERLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@rcknr
rcknr / urlencode.sh
Created January 8, 2013 21:39
Simplistic URL encoding for Busybox shell.
#!/bin/sh
echo "$@" | awk -v ORS="" '{ gsub(/./,"&\n") ; print }' | while read l;
do
case "$l" in
[-_.~a-zA-Z0-9] ) echo -n ${l} ;;
"" ) echo -n %20 ;;
* ) printf '%%%02X' "'$l"
esac
done
@brodul
brodul / streaming.sh
Created July 25, 2012 19:39
Twitch.tv script for streaming
#! /bin/bash
# originaly from http://tinyurl.com/twitch-linux from taladan
# www.youtube.com/user/taladan
# gist created by brodul
INRES="1280x800" # input resolution
#OUTRES="1024x640" # Output resolution
OUTRES="800x500" # Output resolution
@guymac
guymac / setcover.cpp
Last active July 22, 2021 20:54
Embeds cover art in music files (MP3, M4A/AAC, Ogg/Vorbis)
/*
Command-line application for embedding JPEG cover art in MP3, MP4 and OGG audio files.
Based on taglib-1.7 (debian libtag1-dev)
and libb64 (http://libb64.sourceforge.net/) needed for OGG Vorbis embedded cover art
g++ -I/usr/local/include/taglib -L/usr/local/lib -ltag -lb64 setcover.cpp -o setcover
g++ -I/opt/homebrew/include/taglib -L/opt/homebrew/include/b64 -ltag -lb64 setcover.cpp -o setcover
*/
@gustavomtborges
gustavomtborges / oceanic-next.conf
Created January 28, 2021 14:31
Oceanic Next colorscheme for kitty terminal
# Oceanic Next for kitty terminal
# This work is licensed under the terms of the MIT license.
# For a copy, see https://opensource.org/licenses/MIT.
background #1b2b34
foreground #d8dee9
cursor #d8dee9
selection_foreground #D8DEE9