Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 <hi@masedi.net>
########################################################################
CURDIR=$(pwd)
@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"