Skip to content

Instantly share code, notes, and snippets.

View kconde2's full-sized avatar

Kaba Condé kconde2

View GitHub Profile
@oliviagardiner
oliviagardiner / component.vue
Last active February 1, 2021 01:03
Nuxt.js + vue-moment
// components/component.vue
<template lang="pug">
div {{ new Date() | moment("dddd, MMMM Do YYYY, h:mm:ss a") }}
b-form-select(:value="locale" @change="changeLocale($event)")
option(v-for="lang in locales" :value="lang" :key="lang")
i(:class="'flag-icon-' + lang").flag-icon
</template>
<script>
@paolocarrasco
paolocarrasco / README.md
Last active July 11, 2025 09:57
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@mateusnava
mateusnava / docker-compose-zero-downtime.sh
Last active March 24, 2021 14:09
Script for docker-compose deploy with zero downtime
#!/bin/bash
DOCKER_COMPOSE_NAME='web'
DOCKER_COMPOSE_FOLDER='/home/mateus/Projetos/api-agro1'
cd $DOCKER_COMPOSE_FOLDER
echo '==> Pulling...'
docker-compose pull
@dre1080
dre1080 / deploy.sh
Created October 29, 2018 14:09
Zero Downtime Docker Compose Deploys
#!/usr/bin/env bash
CONTAINER_NAME="$1"
PROJECT_NAME="app"
# lets find the first container
FIRST_NUM=`docker ps | awk '{print $NF}' | grep app_$CONTAINER_NAME | awk -F "_" '{print $NF}' | sort | head -1`
NUM_OF_CONTAINERS=1
MAX_NUM_OF_CONTAINERS=2
@axelvnk
axelvnk / OrSearchFilter.php
Last active November 1, 2024 23:08
Api platform OR search filter
<?php
namespace Axelvkn\AppBundle\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\ORM\QueryBuilder;
class OrSearchFilter extends SearchFilter
@florentchauveau
florentchauveau / .gitlab-ci.yml
Last active May 9, 2025 12:27
GitLab CI yaml file for building docker images
# This is a GitLab CI configuration to build the project as a docker image
# The file is generic enough to be dropped in a project containing a working Dockerfile
# Author: Florent CHAUVEAU <[email protected]>
# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/
# do not use "latest" here, if you want this to work in the future
image: docker:20
stages:
- build
@emmanuelnk
emmanuelnk / script.bash
Last active July 1, 2022 11:29
Installing vscode transparency/blur ubuntu 18.04
# [UPDATE]
# Its no longer complicated! Yay!
# Install Glassit Linux VSCode Extension
# then install this:
sudo apt install -y wmctrl x11-utils bash
# then restart VSCode. Done!
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active October 19, 2025 03:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@zoilomora
zoilomora / README.md
Last active April 20, 2025 20:46
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@imShara
imShara / eslint-nuxt-fix-on-save.md
Created August 24, 2019 10:36
ESlint automatically fix on file save with Nuxt

Old Way

Suggested by lcaprini

// nuxt.config.js
build: {
  extend(config, ctx) {
    if (ctx.dev && ctx.isClient) {
      config.module.rules.push({
 enforce : 'pre',