Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Jigsaw puzzle</title>
<script type="text/javascript">
function save(filename, data)
{
var blob = new Blob([data], {type: "text/csv"});
@faparicior
faparicior / .bashrc
Last active December 31, 2017 20:54
Show git branch on bash prompt
# Show git branch name
force_color_prompt=yes
color_prompt=yes
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
@faparicior
faparicior / CheckBoxImgType.php
Last active October 28, 2022 13:24
Symfony2 checkbox button images using choice form
<?php
namespace CheckInBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CheckBoxImgType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)