Skip to content

Instantly share code, notes, and snippets.

import { mount } from '@vue/test-utils'
import MainHeader from '@/components/header/MainHeader.vue'
import router from "@/router"
const wrapper = mount(MainHeader, {
global: {
plugins: [router]
}
})
module.exports = {
chainWebpack: config => {
config.entry('theme') // you can add here as much themes as you want
.add('./src/theme.scss')
.end();
},
css: {
extract: {
filename: '[name].css', // to have a name related to a theme
@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>
#yum install php-pear php-devel httpd-devel pcre-devel gcc make
#pecl install apc
#http://pecl.php.net/bugs/bug.php?id=16843
#http://pecl.php.net/bugs/bug.php?id=16843
extension=apcu.so
apc.enabled=1
apc.write_lock=1
apc.shm_size=100M
apc.slam_defense=0
apc.enable_cli=1
@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 / microtime.php
Created December 8, 2020 16:35
microtime to seconds
<?php
function format_period($seconds_input)
{
$hours = (int)($minutes = (int)($seconds = (int)($milliseconds = (int)($seconds_input * 1000)) / 1000) / 60) / 60;
return $hours . ':' . ($minutes % 60) . ':' . ($seconds % 60) . (($milliseconds === 0) ? '' : '.' . rtrim(
$milliseconds % 1000,
'0'
));
}
@cezarpopa
cezarpopa / stylelintrc
Last active September 16, 2019 19:23
stylelintrc
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 2,
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"color-hex-length": "long",
"color-named": "never",
"selector-combinator-space-after": "always",
"selector-attribute-quotes": "always",
@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)