Skip to content

Instantly share code, notes, and snippets.

View sdaoudi's full-sized avatar

DAOUDI Soufian sdaoudi

View GitHub Profile
@Pierstoval
Pierstoval / Makefile
Last active March 2, 2021 14:38
"Check requirements" command for your Makefile
# Use it like this:
#
# $ printf $(_TITLE) "Something in green" "The message"
#
# This will output something like this:
#
# [Something in green] The message
#
# (of course, with proper colors)
_TITLE := "\033[32m[%s]\033[0m %s\n" # Green text
@JustinTimperio
JustinTimperio / download_from_minio.sh
Created November 4, 2020 19:23
Download a File to Minio with Curl and Zero External Libraries or Programs
#!/usr/bin/env sh
# Example: ./download_minio.sh example.url.com username password bucket-name minio/path/to/file.txt.zst /download/path/to/file.txt.zst
if [ -z $1 ]; then
echo "You have NOT specified a MINIO URL!"
exit 1
fi
if [ -z $2 ]; then
@JustinTimperio
JustinTimperio / upload_to_minio.sh
Last active October 10, 2023 18:22
Upload a File to Minio with Curl and Zero External Libraries or Programs
#!/usr/bin/env sh
# Example: ./upload_to_minio example.url.com username password bucket-name internal/minio/path /absolute/path/file.txt.zst
if [ -z $1 ]; then
echo "You have NOT specified a MINIO URL!"
exit 1
fi
if [ -z $2 ]; then
@danielepolencic
danielepolencic / README.md
Last active April 20, 2024 21:50
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@frak
frak / MigrationHandler.php
Last active October 31, 2019 12:03
Run Doctrine migrations on composer install
<?php
namespace AppBundle\Composer;
use Composer\Script\Event;
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;
class MigrationHandler extends ScriptHandler
{
/**
@cprakashagr
cprakashagr / LICENCE SUBLIME TEXT
Last active May 1, 2024 10:50
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
$ php app/console bdtest:match-uri /Getting-Started/Selected-Features/Create
# Router
route: ez_urlalias
controller: ez_content:viewContent
arguments:
- contentId: 69
- locationId: 71
- viewType: full
- layout: 1
@brookinsconsulting
brookinsconsulting / kernel_patch_for_ezpublish46_lib_ezutils_for_php54.patch
Created September 10, 2014 18:28
eZ Publish 4.6 Kernel Patch to Run Using PHP 5.4 (or greater). Apply patch with these commands: cd /path/to/ez; patch -s -p0 < kernel_patch_for_ezpublish46_lib_ezutils_for_php54.patch; Forum Reference: http://share.ez.no/forums/install-configuration/php-5.4.1-no-call-method-defined-for-function
diff -ruN lib/ezutils/classes/ezmodulefunctioninfo.php lib-for-ezp46-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php
--- lib/ezutils/classes/ezmodulefunctioninfo.php 2014-09-10 13:11:28.000000000 -0500
+++ lib-for-ezp46-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php 2014-09-10 13:03:15.000000000 -0500
@@ -112,12 +112,12 @@
return false;
}
$functionDefinition = $this->FunctionList[$functionName];
- if ( !isset( $functionName['call_method'] ) )
+ if ( !isset( $functionDefinition['call_method'] ) )
{
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository