- Clone this Gist.
- For card sizes other than A5, edit the
size
value in@page
, and theheight
andwidth
properties ofbody
. - Add contents to each face. The simplest approach is to add an image called
front.png
of the same dimensions as the card. - Generate a PDF from the HTML + CSS. If using Prince, it's as simple as
prince index.html card.pdf
. - Take the PDF to a printer, and ask them to print as many copies as you need.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = $('#test'); | |
$(test).select2({ | |
data:[ | |
{id:0,text:"enhancement"}, | |
{id:1,text:"bug"}, | |
{id:2,text:"duplicate"}, | |
{id:3,text:"invalid"}, | |
{id:4,text:"wontfix"} | |
], | |
width: "300px" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setlocale(LC_ALL, | |
'id_ID.UTF8', 'id_ID.UTF-8', 'id_ID.8859-1', 'id_ID', | |
'IND.UTF8', 'IND.UTF-8', 'IND.8859-1', 'IND', | |
'Indonesian.UTF8', 'Indonesian.UTF-8', 'Indonesian.8859-1', 'Indonesian', 'Indonesia', | |
'id', 'ID', | |
// Add english as default (if all Indonesian not available) | |
'en_US.UTF8', 'en_US.UTF-8', 'en_US.8859-1', 'en_US', 'American', 'ENG', 'English', | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ganjil = $genap = []; | |
foreach (range(1, 100) as $angka) { | |
if ($angka % 2 == 0) { | |
$genap[] = $angka; | |
} else { | |
$ganjil[] = $angka; | |
} | |
} |
layout | title | tags | date |
---|---|---|---|
post |
How to Sync Microsoft OneDrive with Ubuntu 18.04 and 20.04 (64 bit) |
ubuntu-18.04, ubuntu-20.04 |
2020-04-23 |
There are many instructions to syncronize your files with OneDrive cloud-based storage in Linux. However they typically address multiple Linux distributions that often causes a confusion or an use of some commands which have not been actually tested before publishing. This instruction is for Ubuntu 18.04 and 20.04 (64 bit) only.
In order to install onedrive, first you need to install some dependencies and set up git.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["#fd7f6f", "#7eb0d5", "#b2e061", "#bd7ebe", "#ffb55a", "#ffee65", "#beb9db", "#fdcce5", "#8bd3c7"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["#115f9a", "#1984c5", "#22a7f0", "#48b5c4", "#76c68f", "#a6d75b", "#c9e52f", "#d0ee11", "#d0f400"] |