Skip to content

Instantly share code, notes, and snippets.

Avatar

Luboš Remplík LubosRemplik

View GitHub Profile
@tronsha
tronsha / installphp7.sh
Last active May 9, 2020
Install PHP7 to Ubuntu
View installphp7.sh
#!/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
@jirutka
jirutka / -README.md
Last active Sep 3, 2020
How to use terminal on Windows and don’t go crazy…
View -README.md

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
@jdewit
jdewit / vim74_lua
Last active Apr 28, 2020
Installing vim 7.4 with lua on Ubuntu 12.04
View vim74_lua
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
@eric1234
eric1234 / install_git_ftp.sh
Last active Feb 24, 2017
Install git-ftp on Ubuntu with sftp support and git ftp fetch support
View install_git_ftp.sh
# 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 Oct 16, 2013
Split tar files and cat them together again.
View gist:7012852
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 -
@kapkaev
kapkaev / gist:4619127
Created Jan 24, 2013
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
View gist:4619127
$ redis-cli
> config set stop-writes-on-bgsave-error no
@thomasd
thomasd / gd_watermark.inc.php
Created Dec 4, 2009
Overlays an image with a watermark image (phpThumb-Plugin for GD-lib)
View gd_watermark.inc.php
<?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');
You can’t perform that action at this time.