Skip to content

Instantly share code, notes, and snippets.

View LubosRemplik's full-sized avatar

Luboš Remplík LubosRemplik

View GitHub Profile
@jdewit
jdewit / vim74_lua
Last active January 30, 2024 04:57
Installing vim 7.4 with lua on Ubuntu 12.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
@kapkaev
kapkaev / gist:4619127
Created January 24, 2013 09:30
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
@jirutka
jirutka / -README.md
Last active October 31, 2023 09:07
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
@tronsha
tronsha / installphp7.sh
Last active October 13, 2023 00:13
Install PHP7 to Ubuntu
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev make
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7
@alexdrean
alexdrean / vimeo-downloader.js
Last active July 20, 2023 22:23 — forked from aik099/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');
@thomasd
thomasd / gd_watermark.inc.php
Created December 4, 2009 10:33
Overlays an image with a watermark image (phpThumb-Plugin for GD-lib)
<?php
/**
* GD Watermark Lib Plugin Definition File
*
* This file contains the plugin definition for GD Watermark
* Usage:
* <?php
* require_once 'path/to/ThumbLib.inc.php';
* $pic = PhpThumbFactory::create('path/to/pic/destination');
* $watermark = PhpThumbFactory::create('path/to/watermark/destination');
@eric1234
eric1234 / install_git_ftp.sh
Last active February 24, 2017 16:43
Install git-ftp on Ubuntu with sftp support and git ftp fetch support
# Rebuild curl with sftp support
apt-get install -y build-essential debhelper libssh2-1-dev
apt-get source curl
apt-get build-dep -y curl
cd curl-*
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage
cd ..
dpkg -i curl*.deb libcurl3-nss*.deb libcurl4-doc*.deb libcurl4-openssl*.deb libcurl3_*.deb
# Use "drench" version which support `git ftp fetch`
@LubosRemplik
LubosRemplik / gist:7012852
Created October 16, 2013 18:55
Split tar files and cat them together again.
You can use split for this:
tar czpvf - /path/to/archive | split -d -b 100M - tardisk
This tells tar to send the data to stdout, and split to pick it from stdin - additionally using a numeric prefix (`-d`), a chunk size (`-b`) of 100M and using 'disk' as the base for the resulting filenames (tardisk00, tardisk01, etc.).
To extract the data afterwards you can use this:
cat tardisk* | tar xzpvf -