This file contains 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
find src/ -type f -name *Test.php -exec grep -H -c "@group" {} \; | grep :0\$ | awk -F':' '{ print $1 }' |
This file contains 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
sed '$!N;s/\n/ /' infile |
This file contains 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 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 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 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 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 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 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 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
/** | |
* Simulate the read-only attribute on a select list (as it is not normalized). | |
* @see http://www.w3.org/wiki/HTML/Elements/select | |
* @param Object Select list element | |
**/ | |
function setReadOnlyOnSelect(selectList) | |
{ | |
// Ensure selectList exists | |
if(!selectList.length) { | |
console.warn("Unable to find specified select list."); |
OlderNewer