This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Splitting file into smaller parts | |
split --bytes=512M bigfile prefix | |
# Joining all file parts | |
cat prefix* > bigfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker stop $(sudo docker ps -a -q) | |
sudo docker rm $(sudo docker ps -a -q) | |
sudo docker rmi $(sudo docker images -a -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Controller | |
$tag = new Tag(); | |
$dm->persist($tag); | |
$dm->flush(); | |
$this->getContainer()->get('my_service')->import($content, $tag); | |
// Service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Based on http://nrocco.github.io/2012/04/19/git-pre-commit-hook-for-PHP.html post | |
# | |
# Do not forget to: chmod +x .git/hooks/pre-commit | |
BAD_PHP_WORDS='var_dump|die|todo' | |
BAD_TWIG_WORDS='{{ dump(.*) }}' | |
EXITCODE=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"log" | |
"os" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run: | |
docker run \ | |
--rm \ | |
--volume="`pwd`:/srv" \ | |
--tty \ | |
--interactive \ | |
--publish="8080:8080" \ | |
marmelab/go run src/marmelab/gollabedit/*.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import View from "./folder/View"; | |
class Application { | |
constructor() { | |
this.view = new View("I'm a view!"); | |
} | |
sayHello() { | |
console.log("Hello"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @see http://www.jonathan-petitcolas.com/2015/09/21/dump-docker-ized-database-to-amazon-s3.html | |
# Configuration | |
FILENAME="awesomeproject-`date +%Y-%m-%d-%H:%M:%S`.sql" | |
CONTAINER_NAME="awesomeproject_pgsql" | |
DUMPS_FOLDER="/home/awesomeproject/dumps" | |
BUCKET_NAME="awesomeproject-private" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// couvent.js - MIT license | |
Array.prototype.slice.call(document.querySelectorAll('*')).forEach(function (el) { | |
el.style.display = 'none'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const typeFinder = type => function* (params = {}, ref = 'master') { | |
const search = function* (searchParams) { | |
const Api = yield initApi; | |
const reference = ref === 'master' ? Api.master() : ref; | |
const preparedForm = Api.form('everything') | |
.ref(reference) | |
.pageSize(200); | |
const predicates = []; |