Skip to content

Instantly share code, notes, and snippets.

View daniel-zahariev's full-sized avatar

Daniel Zahariev daniel-zahariev

View GitHub Profile
@phpdreams
phpdreams / rebuild-cache.php
Created April 28, 2018 00:17
Speaker List Cache Generation
<?php
// this will read in all the speakers, sort them by date, then store in a file for use later
$speakerList = [
'speaker-file',
];
$speakers_all = [];
foreach($speakerList as $speaker) {
$speakers_all[$speaker] = include_once("./speakers/{$speaker}.php");
$speakers_all[$speaker]['bullet-points'] = text2bullets($speakers_all[$speaker]['bullet-points']);
@prog
prog / .gitlab-ci.yml
Created December 14, 2017 07:30
How to use composer (php) including cache with gitlab-ci
build:install-vendor:
stage: build
image: <any-image-with-composer>
before_script:
- composer config -g cache-dir "$(pwd)/.composer-cache"
script:
- composer install --ignore-platform-reqs --no-dev --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .composer-cache/
@zacgx
zacgx / airflow-python3.sh
Last active July 19, 2022 15:15
Installing Airflow with CeleryExcuter, using PostgreSQL as metadata database and Redis for Celery message broker
# this script has been tested and worked in a freshly installed Ubuntu 16.04 and 16.10
# it assumes that you are running airflow in a private netowrk and no need to be worry about outside access
# if that's not the case, the lines for PostgreSQL and Redis in this script need to be updated accordingly
# run as root
sudo su
# initial system updates and installs
apt-get update && apt-get upgrade -y && apt-get autoremove && apt-get autoclean
apt-get -y install build-essential binutils gcc make git htop nethogs tmux
@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang
@umidjons
umidjons / pdf-thumbnail-php.md
Last active December 6, 2023 21:41
Creating PDF thumbnails in PHP

Creating PDF thumbnails in PHP

Install Ghostscript

Download and install right version of ghostscript. In my case my PHP was x86 architecture, so I download Ghostscript 9.14 for Windows (32 bit).

Enable ImageMagick

@cristianoc72
cristianoc72 / propel.yaml
Last active March 21, 2022 20:32
Propel sample configuration file
## Sample Propel configuration file ##
propel:
## General settings ##
general:
# The name of your project.
# This affects names of generated files, etc.
project:
version: 2.0.0-dev
@troelskn
troelskn / underscore.php
Created December 22, 2010 13:45
camelize + underscore in php
<?php
/**
* Transforms an under_scored_string to a camelCasedOne
*/
function camelize($scored) {
return lcfirst(
implode(
'',
array_map(