Skip to content

Instantly share code, notes, and snippets.

View kekbait's full-sized avatar
🐱
Happy !

kekbait

🐱
Happy !
View GitHub Profile
@jcataluna
jcataluna / gist:1dc2f31694a1c301ab34dac9ccb385ea
Created July 8, 2016 17:23
Script to save all images from a docker-compose.yml file
#!/bin/bash
mkdir -p out
for img in `grep image $1| sed -e 's/^.*image\: //g'`;
do
cleanname=${img/\//-}
tag=`docker images | grep $img | awk '{print $2}'`
echo "Exporting image: $img, tag:$tag ($cleanname)..."
docker save $img -o out/$cleanname.tar
@dbu
dbu / README.md
Last active October 2, 2018 11:57
Convert NelmioApiDocBundle annotations to Swagger PHP

A Symfony command to convert from NelmioApiDocBundle annotations to Swagger-PHP annotations.

This code is provided as is. Make sure to have your code committed to version control before running the command. Check if things work out and if not, use version control to reset the automated changes and fix the command.

@EvgenyOrekhov
EvgenyOrekhov / Docker Compose files for PHP development.md
Last active April 16, 2024 18:03
Simple Docker Compose files for PHP development

Simple Docker Compose files for PHP development

Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.apache.yml up

nginx + Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+apache.yml up

nginx + PHP-FPM + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+php-fpm.yml up

@lopspower
lopspower / README.md
Last active December 19, 2019 13:10
Testing activity in Android Studio

Testing activity in Android Studio

How we build the app

Before we start writing our first UI test I want to describe our development process.

  1. First, we write a test for a UI or logic that does not yet exist.
  2. We expect to see build errors or failed tests.
  3. Then we create a UI element or write program logic.
  4. Finally, we run the test and make sure it passes.
@siadat
siadat / fzf-chrome-cli.bash
Last active May 31, 2019 07:07
Fuzzy finder for Chrome tabs (using fzf and chrome-cli)
#/usr/bin/env bash
# Author: Sina Siadat (2015)
set -e
browser_name="Google Chrome"
browser_cli="chrome-cli"
err=
# Check requirements
hash chrome-cli 2> /dev/null ; if [ $? -eq 1 ]; then
err=1
@wataruoguchi
wataruoguchi / How to make your website to maintenance mode.md
Last active January 7, 2024 14:28
How to make your website to maintenance mode - Apache

Apache

How to make your website to maintenance mode

  1. Put maintenance.html into your root directory

  2. Open .htaccess file

  3. Insert this block in the first line of the file

     ErrorDocument 503 /maintenance.html
     <IfModule mod_rewrite.c>
    

RewriteEngine On

@kevinjalbert
kevinjalbert / readme.md
Last active December 31, 2021 03:49
Project-Wide Search and Replace with Vim

Project-Wide Search and Replace with Vim

There are many instances where you might want to perform a mass search and replace in Vim. The following are two commands that can help out with such a task.

List of Files

First you need to acquire a list of files in which you want to perform search and replaces on. The following Vim command args allows you to store a set of file names to act on later.

:args `<command which generates a file list>`

Thus we can use the following to store a list of files which match the 'Base::Lol::' . pattern.

@carsongee
carsongee / tail_jenkins.py
Last active February 15, 2021 14:04
Tail Jenkins Jobs
#!/usr/bin/env python
"""
Tail a Jenkins build in a terminal
"""
import os
import requests
import sys
import time
@miguelmota
miguelmota / README.md
Last active January 6, 2025 03:43
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@alain-andre
alain-andre / mongodb_specials.md
Last active May 12, 2021 08:22
Les Aggregations sous MongoDB (informations issues de leurs cours)

Aggregation

Pipeline

  • $project - Sélectionnez, remodeler - 1:1
  • $match - Filtrer - n:1
  • $group - Agréger - n:1
  • $sort - Trier - 1:1
  • $skip - Sauter - n:1
  • $limit - Limiter - n:1
  • $unwind - Découper un champ (array) - 1:n