Skip to content

Instantly share code, notes, and snippets.

View mickaelandrieu's full-sized avatar
🏠
Working from home

Mickaël Andrieu mickaelandrieu

🏠
Working from home
View GitHub Profile
@stursby
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@zaiste
zaiste / rst_to_md.sh
Created February 5, 2017 18:54
Convert RST to Markdown using Pandoc
FILES=*.rst
for f in $FILES
do
filename="${f%.*}"
echo "Converting $f to $filename.md"
`pandoc $f -f rst -t markdown -o $filename.md`
done
@dfontana
dfontana / CmderZSH.md
Last active March 12, 2023 21:45
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
@andrewelkins
andrewelkins / install-docker-on-linux-mint-18.sh
Last active February 2, 2020 21:53
Install Docker on Linux Mint 18
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
@a-ast
a-ast / FixtureAwareTestCase.php
Created May 2, 2016 12:23
Load doctrine fixtures before test
<?php
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
abstract class FixtureAwareTestCase extends KernelTestCase
@JamieMason
JamieMason / run_e2e_tests
Created November 27, 2014 17:00
Run all CasperJS tests in a project using a glob file pattern.
#!/bin/bash
# Runs our end to end tests in casperjs.
# Run this script as follows from the project root;
#
# bin/run_e2e_tests
printf "\e[93m > SEARCHING FOR TEST FILES \033[0m \n"
find "$PWD" -iname "*.e2e.spec.js" -type f -print0 | while read -d '' -r file; do
run:
casperjs index.js && convert *.jpg video.mpeg && gify video.mpeg out.gif && rm *.jpg video.mpeg
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
# Based on https://gist.github.com/fernandoaleman/5083680
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
@clochix
clochix / casperShell.js
Created October 8, 2013 09:37
Sample code to call a shell script from CasperJS
// (…)
var childProcess;
try {
childProcess = require("child_process");
} catch (e) {
this.log(e, "error");
}
if (childProcess) {
childProcess.execFile("/bin/bash", ["mycommand.sh", args1, args2, args3], null, function (err, stdout, stderr) {
this.log("execFileSTDOUT:", JSON.stringify(stdout), 'debug');