Skip to content

Instantly share code, notes, and snippets.

@zenny
zenny / seen.sh
Created October 26, 2015 08:24 — forked from naelstrof/seen.sh
Takes screenshots and videos of user selection, automatically uploads to a server mounted on your system, then copies the URL to your clipboard.Depends on xclip, ffmpeg, maim, mplayer, and slop.Use "seen.sh image" to capture an image, and use "seen.sh video" to start recording a video. Then use "seen.sh video" again to stop recording.I use maim …
#!/bin/bash
server="/mnt/charles/farmstore/content/${1}s"
url="http://farmpolice.com/content/${1}s"
imageEncoding=".png"
videoEncoding=".webm"
imagetake="/usr/share/sounds/freedesktop/stereo/screen-capture.oga"
videotake="/usr/share/sounds/freedesktop/stereo/complete.oga"
name=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 8)
pidFile="/tmp/seen_record.pid"
@zenny
zenny / ffmpeg_installer
Created November 19, 2015 21:11 — forked from joglomedia/ffmpeg_installer
Simple Bash Script to Install FFMPEG + Required Libraries in Ubuntu 14.04
#!/bin/bash
# Bash Script to Install FFMPEG in Ubuntu 14.04
# Ref: http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
# Opsional: install exiftool: apt-get install libimage-exiftool-perl
#
# Author: Edi Septriyanto http://masedi.net <[email protected]>
########################################################################
CURDIR=$(pwd)
@zenny
zenny / tengine_with_replace_filter_nginx_module
Created April 27, 2016 08:56 — forked from danbao/tengine_with_replace_filter_nginx_module
add replace-filter-nginx-module into tengine and create deb package
#!/usr/bin/env bash
# Copyright @ LinZhen@Net
# install git
apt-get install git -y
# install sregex
apt-get install bison -y
cd /tmp
git clone https://github.com/openresty/sregex.git
@zenny
zenny / erpnext_magento.php
Created January 25, 2018 21:05 — forked from rmehta/erpnext_magento.php
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
@zenny
zenny / Lsyncd Technical Session.md
Created June 12, 2019 06:00 — forked from mralexjuarez/Lsyncd Technical Session.md
Quick Tutorial on Using Lsyncd

Lsyncd Technical Session

So what is lsyncd?

Lsyncd is a tool used to keep a source directory in sync with other local or remote directories. It is a solution suited keeping directories in sync by batch processing changes over to the synced directories.

When would we use lsyncd?

So the generic use case is to keep a source directory in sync with one or more local and remote directories.

@zenny
zenny / c920.md
Created July 18, 2019 21:52 — forked from wwwins/c920.md
live streaming from raspberry pi with logitech usb c920

video stream(v4l2-ctl)

v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
        /dev/video0

HD Pro Webcam C920 (usb-3f980000.usb-1.2):
        /dev/video1
@zenny
zenny / dnsupdate.py
Created December 23, 2019 14:01 — forked from pklaus/dnsupdate.py
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
@zenny
zenny / adminer_setup.sh
Created January 1, 2020 18:29 — forked from zloynemec/adminer_setup.sh
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i
@zenny
zenny / tmux-migrate-options.py
Last active January 7, 2020 07:28 — forked from tbutts/tmux-migrate-options.py
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#