Skip to content

Instantly share code, notes, and snippets.

View hans2103's full-sized avatar
🏠
Working from home

Hans Kuijpers hans2103

🏠
Working from home
View GitHub Profile
@hans2103
hans2103 / onename
Created January 8, 2016 15:15
onename
Verifying that +hans2103 is my blockchain ID. https://onename.com/hans2103
@hans2103
hans2103 / bash-export-delicious
Created February 20, 2016 13:36
command line - export Delicious Bookmarks
$ curl https://{username}:{password}@API.del.icio.us/v1/posts/all > bookmarks.xml
@hans2103
hans2103 / installm2db.sh
Created March 2, 2016 14:36 — forked from peterjaap/installm2db.sh
Install M2 database
bin/magento setup:install \
--base-url=http://mage2a.dev/ \
--db-host=localhost \
--db-name=mage2a \
--db-user=user \
--db-password=password \ # or leave this line out for dev
--admin-firstname=firstname \
--admin-lastname=lastname \
--admin-email=email@example.com \
--admin-user=username \
@hans2103
hans2103 / font_grabber.rb
Created April 14, 2016 11:41 — forked from ttscoff/font_grabber.rb
Give it a <link> from Google fonts and get back CSS with fonts embedded
#!/usr/bin/ruby
# encoding: utf-8
# Grab google web fonts and embed them as base64 data URIs
# <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/>
require 'base64'
if ARGV.length > 0
input = ARGV
elsif STDIN.stat.size > 0
input = STDIN.read.strip.split(/\n+/)
@hans2103
hans2103 / helper-unsetSqueezeBox.php
Created May 31, 2016 09:33
template function to remove SqueezeBox.
$helper = new ThisTemplateHelper();
$helper->unsetSqueezeBox();
class ThisTemplateHelper
{
public function __construct()
{
$this->doc = JFactory::getDocument();
}
@hans2103
hans2103 / default_login.php
Created June 30, 2016 13:16
return to the previous page after login. Template override com_users/login/default_login.php for Joomla!
<?php
if ($this->params->get('login_redirect_url'))
{
$login_redirect_url = $this->params->get('login_redirect_url', $this->form->getValue('return'));
}
else
{
$referer = htmlspecialchars($_SERVER['HTTP_REFERER']);
$uri = JUri::getInstance($referer);
$query = JFactory::getApplication()->getRouter()->parse($uri);
@hans2103
hans2103 / remove squeezbox
Created August 4, 2016 08:08
Removal of SqueezeBox in Joomla! frontend head
// what is added
<script type="text/javascript">
jQuery(function($) {
SqueezeBox.initialize({});
SqueezeBox.assign($('a.modal').get(), {
parse: 'rel'
});
});
@hans2103
hans2103 / less.watcher
Last active November 15, 2016 10:51
settings LESS watcher PHP Storm
# PHPStorm LESS watcher settings
- File type: less
- Scope: define scope of working template
- Program: /usr/local/bin/lessc
- Arguments: --clean-css="--compatibility=ie9 --advanced" --source-map-map-inline $FileName$
- Output path to refresh: ../css/$FileNameWithoutExtension$.css
- [ ] Immediate file synchronization
- [X] Track only root files
@hans2103
hans2103 / robots.txt
Last active December 7, 2016 23:40
Magento robots.txt as published on our Byte blog Magento Robots.txt [http://www.byte.nl/blog/magento-robots-txt/]
# $Id: robots.txt,v magento-specific 2010/28/01 18:24:19 goba Exp $
# Edited: 2014/10/30 by Byte.nl
#
# robots.txt
#
# This file is to prevent the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these “robots” where not to go on your site,
# you save bandwidth and server resources.
#
@hans2103
hans2103 / snippet-bs3-carousel.html
Last active December 12, 2016 10:32
Bootstrap 3 Carousel with Modal popup for NoNumber Snippets in combination with User Agent Detector, NoNumber Sourcerer and NoNumber Articles Anywhere. use: {snippet carousel|category-alias}