Skip to content

Instantly share code, notes, and snippets.

View cezarpopa's full-sized avatar
:shipit:
A bit of this and a bit of that.

Cezar Popa cezarpopa

:shipit:
A bit of this and a bit of that.
View GitHub Profile
@cezarpopa
cezarpopa / Tinyint.php
Created December 11, 2021 17:19 — forked from elenakondrateva/Tinyint.php
Custom Doctrine DBAL type 'tinyint' for Symfony
<?php
namespace AppBundle\Doctrine\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
class Tinyint extends Type
{
const TINYINT = 'tinyint';
@cezarpopa
cezarpopa / faqs.blade.php
Created December 3, 2021 17:26 — forked from Dorf/faqs.blade.php
[Shortcodes in Sage] Example for FAQs #sage #blade #shortcodes #partials
///////////////////////////
// /resources/views/partials/shortcodes/faqs.blade.php
<ul class="accordion span12" data-allow-all-closed="true" data-deep-link="true" data-deep-link-smudge="true" data-deep-link-smudge-delay="600" data-accordion id="deeplinked-accordion-with-smudge">
@foreach($faqs as $faq)
<li class="accordion-item" data-accordion-item>
<a href="#{{ $category }}{{ $loop->iteration }}" class="accordion-title">{!! $faq->post_title !!}</a>
<div class="accordion-content" data-tab-content id="answer{{ $loop->iteration }}">
{!! $faq->post_content !!}
</div>
</li>
@cezarpopa
cezarpopa / stimulus.md
Created October 15, 2021 18:13 — forked from mrmartineau/stimulus.md
Stimulus cheatsheet
@cezarpopa
cezarpopa / ._readme.md
Created May 7, 2021 17:06 — forked from frne/._readme.md
Fancy Colors for (OSX-) Bash

Fancy Colors for (OSX-) Bash

Fancy console screenshot

Prerequisites

Git contrib-scripts and grc

Run commands in install.sh

@cezarpopa
cezarpopa / docker_kill.sh
Last active August 4, 2018 14:08 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker stop $(docker ps -a -q)
@cezarpopa
cezarpopa / WordPress.xml
Created September 30, 2016 09:01 — forked from Rarst/WordPress.xml
WordPress Live Templates for PhpStorm
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="WordPress">
<template name="aa" value="add_action( '$hook$', '$callback$' );&#10;$END$" description="add_action" toReformat="false" toShortenFQNames="true">
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
@cezarpopa
cezarpopa / csv.php
Created January 16, 2016 09:18 — forked from lordspace/csv.php
a class to read and write CSV
<?php
/**
* This class is used in Orbisius Price Changer for WooCommerce
* This premium WooCommerce extension allows you to change product prices (up/down) for all products or for a selected category and its subcategories.
* You can review them before actually making the changes.
*
* @see http://club.orbisius.com/products/wordpress-plugins/woocommerce-extensions/orbisius-woocommerce-ext-price-changer/
* @author jaywilliams | myd3.com | https://gist.github.com/jaywilliams
* @author Svetoslav Marinov (SLAVI) | http://orbisius.com
@cezarpopa
cezarpopa / irsz.js
Last active August 29, 2015 14:27 — forked from numist/irsz.js
dynamically resize images to fit viewport (intelligently!)
/*
* Copyright © 2012 by Scott Perry
* Released under the MIT License; its terms are at the end of this file.
*
* This file depends on:
* • jQuery (tested against 1.7.1)
* http://jquery.com/
*
* Basic logic of this file:
* + if irsz_auto is true
/**
* Create Custom Meta Boxes for WooCommerce Product CPT
*
* Using Custom Metaboxes and Fields for WordPress library from
* Andrew Norcross, Jared Atchinson, and Bill Erickson
*
* @link http://blackhillswebworks.com/?p=5453
* @link https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress
*/
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/