Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8" ?>
<!--
/**
* JeroenVermeulen_Solarium
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
/**
* JeroenVermeulen_Solarium
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
#!/bin/bash
sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
apt-cache policy docker-engine
sudo apt-get install -y docker-engine
@igez
igez / Created.php
Created November 2, 2016 02:17 — forked from ihor-sviziev/Created.php
Magento 1.9.1.0 time created backend for eav attribute - Fix getFormat
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
-- https://www.percona.com/blog/2008/02/04/finding-out-largest-tables-on-mysql-server/
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;
@igez
igez / v8js.sh
Created December 5, 2016 10:16
Install V8js php extension on ubuntu
#!/bin/bash
apt-get update
apt-get install -y build-essential chrpath git
cd /tmp
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
@igez
igez / sample.json
Last active December 19, 2016 04:37
[
{
"name":"PT Angin Ribut",
"states":[
{
"title":"Introduction",
"cards":[
{
"name":"Card #1"
}
@igez
igez / slackpost
Created February 7, 2017 10:20 — forked from dopiaza/slackpost
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@igez
igez / index.html
Last active May 7, 2017 06:33
Circles with drag function and animation
<!DOCTYPE html>
<meta charset='utf-8'>
<style>
.node {
stroke: #000;
stroke-width: 1.5px;
}
.node.dragged {
stroke: #000;
@igez
igez / index.html
Created May 7, 2017 16:38
Move circle to mouse position at constant speed
<!DOCTYPE html>
<meta charset='utf-8'>
<svg width='960' height='600'>
<defs>
<pattern>
<pattern id="pat" width="22" height="22" patternUnits="userSpaceOnUse">
<path d="M 0 0 L 22 0 22 22 0 22 z" stroke="#eee" stroke-width="1" fill="none"></path>
</pattern>
</pattern>