Skip to content

Instantly share code, notes, and snippets.

@dg
dg / composer-frontline.php
Last active February 13, 2023 14:14
Composer Frontline: Updates all the version constraints of dependencies in the composer.json file to their latest version.
<?php
declare(strict_types=1);
// Updates all the version constraints of dependencies in the composer.json file to their latest version.
//
// usage: composer-frontline.php (updates all Nette packages)
// composer-frontline.php doctrine/* (updates all Doctrine packages)
// composer-frontline.php * (updates all packages)
@borekb
borekb / README.md
Last active August 10, 2022 14:14
Docker and Git Bash / MSYS2 on Windows: path conversion workaround

👋 Moved to https://github.com/borekb/docker-path-workaround


Docker in Git Bash / MSYS2 on Windows: path conversion workaround

UPDATE 07/2018: I switched from Git Bash to MSYS2 recently which should be very similar, if not the same, but there some subtle differences which made me realize this is more tricky than I thought and that I don't 100% understand what is going on. If someone can help, please let me know in the comments.

Invoking docker in MSYS2 shell or Git Bash typically fails with complains about paths, for example:

@HappyCerberus
HappyCerberus / bludiste.c
Created April 8, 2012 13:50
Vzorove reseni bludiste (jendotlive faze = jednotlive verze souboru)
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int search(char **bludiste, int y, int x)
{
/* cil */
if (bludiste[y][x] == 'C') return 1;
/* policko neni volne, ani start */
@HappyCerberus
HappyCerberus / koza.c
Created March 14, 2012 13:25
Vzorove reseni problemu koza,vlk,zeli
/* Copyright (c) 2012 Mgr. Simon Toth (kontakt@simontoth.cz)
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
#include <stdio.h>
#define STATE_BAD 1
#define STATE_FINAL 2
/** \brief Kodovaci funkce pro zakodovani expandovaneho stavu do unikatniho cisla