Skip to content

Instantly share code, notes, and snippets.

View ItsMurumba's full-sized avatar
🚀

Kelvin Murumba ItsMurumba

🚀
View GitHub Profile
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# You can specify a custom docker image from Docker Hub as your build environment.
# run composer check-platform-reqs for a list of required extensions.
image: php:7.2-fpm
pipelines:
default:
# Not needed unless you're doing feature tests.
# - step:
version: '3.2'
services:
db:
image: mysql:8.0
container_name: mysq_server
restart: always
volumes:
- <directory for backup your DB>:/var/lib/mysql
ports:
@ItsMurumba
ItsMurumba / php-psql-docker.txt
Created June 30, 2020 04:35
Install php psql extension in docker. Add the above line in your Dockerfile
RUN apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql
@ItsMurumba
ItsMurumba / default.conf
Created May 8, 2020 17:37
The reverse proxy configuration for Nginx
server {
server_name example.co www.example.co;
location / {
proxy_pass http://localhost:8082/;
}
}
@ItsMurumba
ItsMurumba / installation.sh
Last active April 19, 2019 18:03
laravel Installation on Ubuntu 18.04
#Install Laravel
composer global require "laravel/installer"
#Add composer to path to access laravel globally
export PATH="~/.config/composer/vendor/bin:$PATH"
#For Mac
export PATH="~/.composer/vendor/bin:$PATH"
#Refresh bashrc file
source ~/.bashrc
@ItsMurumba
ItsMurumba / hidePublishedBy.css
Created November 9, 2018 07:40
WordPress Hide Published by using CSS
.date updated, .author {
display:none !important;
}
@ItsMurumba
ItsMurumba / videoBackground.html
Last active September 4, 2018 14:37
Script To Add Youtube Video Background
<style>
.bg-video {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: -1;
}
@ItsMurumba
ItsMurumba / hide.js
Created August 7, 2018 06:29
This code worked for me. You can replace $(this).val() with #target
$('.'+ $(this).val()).show(); $('.tabcontent2 tr:not(.'+ $(this).val() +')').hide();
@ItsMurumba
ItsMurumba / moveZeros.php
Last active September 14, 2017 04:40
moveZeros
<?php
function moveZeros($arr){
$count=0;
$n=sizeof($arr);
for($i=0;$i<$n;$i++){
if($arr[$i]!='integer'){
$arr[$count++]=$arr[$i];
}
}
@ItsMurumba
ItsMurumba / max_pair.php
Last active September 14, 2017 04:39
max_pair
<?php
function max_pair($A){
$n=sizeof($A);
//Initialize the max sum
$a=$A[0];
$b=$A[1];
for($i=0;$i<$n;$i++){