Skip to content

Instantly share code, notes, and snippets.

View jdrda's full-sized avatar

Jan Drda jdrda

View GitHub Profile
@jdrda
jdrda / install.sh
Created June 15, 2019 17:06 — forked from mickaelandrieu/install.sh
Install phantomjs/casperjs on GNU/Linux
#!/bin/bash
# `` sudo sh install.sh ``
# Developement environnement
# Important: use 'i686' instead of 'x86_64'
#
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724
echo Installation de Phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
@jdrda
jdrda / general-setter.php
Last active November 24, 2018 01:02
General setter with possibility of set default value suitable for writing other setters
class Product
{
/**
* Product name to be set
*
* @var string
*/
private $_name;
@jdrda
jdrda / slug.php
Last active April 17, 2017 13:26
slug-from-laravel-including-all-functions
/**
* Returns the replacements for the ascii method.
*
* Note: Adapted from Stringy\Stringy.
*
* @see https://github.com/danielstjules/Stringy/blob/2.3.1/LICENSE.txt
*
* @return array
*/
protected static function charsArray()
@jdrda
jdrda / bootstrap-responsive-image-center.css
Created January 4, 2017 08:56
Bootstrap responsive image (img-responsive) center (text-center)
.text-center .img-responsive {
margin-left: auto;
margin-right: auto;
}