Skip to content

Instantly share code, notes, and snippets.

View sgpopov's full-sized avatar

Svilen Popov sgpopov

View GitHub Profile
@sgpopov
sgpopov / ProgressBarCallback.php
Created May 9, 2019 15:48 — forked from jeffochoa/ProgressBarCallback.php
ProgressBar callback trait for Laravel commands
<?php
namespace App\commands;
trait ProgressionBarOutput
{
public function runProcess(\Countable $countable, callable $callback)
{
$bar = $this->output->createProgressBar(count($countable));
$bar->start();
@sgpopov
sgpopov / bamboo-overview.md
Created July 26, 2016 11:46
Bamboo overview

First you need to get used with some Bamboo concepts (also see the official Atlassian Bamboo documentatiom

Build plans and artifacts

A build plan is the process that generates a Bamboo artifact. An artifact is something that can be deployed later, most of the time an executable or a jar file when you are talking about software that compiles, but for our sites this will simply be a compressed tarball file called site.tar.gz that contains the source code.

Build plans are composed of three pieces: Stages, Jobs and Tasks. If you look at the graph below it should be clear how those three fit inside each other:

bamboo-production-plan

@sgpopov
sgpopov / ruleset.xml
Last active July 15, 2019 10:07
PHP Code Sniffer Rules
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="MentorMate">
<description>
The coding standard of the MentorMate team, based on the Generic, PSR2,
Squiz and Zend coding standards.
</description>
<arg name="colors"/>
<ini name="memory_limit" value="128M"/>
@sgpopov
sgpopov / tell-time-every-hour.vbs
Created February 23, 2016 09:19
Windows: announce the time every hour
Dim speaks, speech
speaks = "It's " & hour(time) & " o'clock"
Set speech = CreateObject("sapi.spvoice")
speech.Speak speaks
@sgpopov
sgpopov / make-certificate.sh
Last active February 22, 2016 15:16
Windows: Creating a code-signing certificate
#!/bin/bash
printf "\n"
commands=(makecert certutil pvk2pfx)
for i in "${commands[@]}"
do
command -v $i >/dev/null && continue || {
echo "ERROR: $i command not found.";
@sgpopov
sgpopov / .htaccess.md
Created August 30, 2013 09:30
Apache Configuration File