Skip to content

Instantly share code, notes, and snippets.

View miznokruge's full-sized avatar

Mizno Kruge miznokruge

View GitHub Profile
<?php
App::import('Vendor', 'xtcpdf');
set_time_limit(300000);
$pdf = new XTCPDF('P', PDF_UNIT, 'A4', true, 'UTF-8', false);
$applicationoc_name = 'Sales Report';
$filename = time() . '.pdf';
//---------------------------------------------------------- config start ---------------------------------------------------------------------------
$pdf->namaorg = $application['company_name'];
$pdf->telp = $application['company_phone'];
/**
* Be sure to include library scripts in this order. Can be placed either
* in the header or footer.
*/
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script>

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@miznokruge
miznokruge / crosstab.txt
Created May 17, 2017 02:51 — forked from hidayat365/crosstab.txt
Another Dynamic MySQL Cross Tab
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Nur>d:
D:\>cd xampp
D:\xampp>cd mysql\bin
D:\xampp\mysql\bin>mysql -u root
@miznokruge
miznokruge / imagemagick-install-steps
Created July 11, 2017 11:54 — forked from rodleviton/imagemagick-install-steps
Installing Image Magick on Ubuntu 14.04
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make
checkinstall
@miznokruge
miznokruge / migrateorders.php
Created July 14, 2017 07:50 — forked from benlumley/migrateorders.php
Script to migrate woocommerce orders from one wordpress database into another, along with associated data.
<?php
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.
// will change order ids
// My use case for this is when I've got a staging/test version of a site with new posts/products/pages etc, that needs
// to go live without the loss of any orders placed on the site site since we copied it to the staging site.
@miznokruge
miznokruge / README-Template.md
Created July 20, 2017 12:11 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@miznokruge
miznokruge / linkedin.php
Created July 30, 2017 15:29 — forked from aguillard/linkedin.php
LinkedIn Resume
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
date_default_timezone_set('Europe/Paris');
setlocale(LC_TIME, "fr_FR.utf8");
// Fill the keys and secrets you retrieved after registering your app
$oauth = new OAuth("__API_KEY__", "__API_SECRET__");
$oauth->setToken("__USER_TOKEN__", "__USER_SECRET__");
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
<?php
/** @var string @persistent */
public $_backlink;
public function link($destination, $args = [])
{
$modifiers = [];
if (($pos = strrpos($destination, ')')) !== FALSE) {
$modifiers = array_fill_keys(explode(')(', substr($destination, 1, $pos - 1)), TRUE);
$destination = substr($destination, $pos + 1);