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
#!/usr/bin/env bash | |
# tag.sh -t my-awesome-tag@1.2.3 -dcyv | |
# | |
# -d Deletes tags | |
# -c Creates tag on the same commit | |
# -y Non-interactive mode (always YES) | |
# -v Slightly increased verbosity | |
TAG='' |
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
// Usage: ~$ some-process | node output_jsonify.js | |
const pump = require('pump'); | |
const split = require('split2'); | |
const through = require('through2'); | |
const dope = msg => ({ | |
pid: process.pid, | |
time: new Date().getTime(), | |
level: /Error/.test(msg) ? 3 : 30, |
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
ffmpeg -i in.mp4 -r 15 -vf scale=512:-1 -ss 00:00:04 -to 00:00:12 out.gif |
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 | |
ENVIRONMENT="prod"; | |
if [ "$3" != "" ]; then | |
ENVIRONMENT=$3; | |
fi | |
if [ "$2" == "" ]; then | |
echo "Repository URL is mandatory!"; |
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 | |
use Doctrine\ORM\Query; | |
use Doctrine\ORM\Tools\Pagination\Paginator; | |
// ------------------- // | |
public function paginate(Query $query, int $page = 1, int $limit = 10, bool $fetchJoinCollection = true) | |
{ | |
// If we don't have a limit just return the result |
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
#!/usr/bin/env bash | |
fetch=$(git fetch); | |
if [ "$(git show-ref refs/remotes/origin/$1)" ]; then # Checking branch for existence on remote | |
co=$(git checkout "$1"); # Checkouting branch that we checked for existence above | |
else | |
defaultFb="master"; # Default fallback | |
fb=${2:-$defaultFb} # Resulting fallback | |
echo "- Branch $1 does not exist. Switching to ${fb}"; |
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
<!-- Apple Touch Icons --> | |
<link rel="apple-touch-icon" href="/images/apple-touch-icon-60x60.png" /> | |
<link rel="apple-touch-icon" sizes="76x76" href="/images/apple-touch-icon-76x76.png"> | |
<link rel="apple-touch-icon" sizes="120x120" href="/images/apple-touch-icon-120x120.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="/images/apple-touch-icon-152x152.png"> | |
<!-- End of Apple Touch Icons --> |
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
mencoder -ovc copy -oac mp3lame GOPR3934.MP4 GP013934.MP4 GP023934.MP4 -o finalcut.avi |
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
# Printer identity needs to be read separately by another hotplug script which prints id of plugged hardware | |
if [ $PRODUCT = "3f0/3e17/100" ]; then # `3f0/3e17/100` - printer identity | |
if [ $ACTION = "add" ]; then | |
sleep 1 | |
cat /jffs/sihpP1006.dl > /dev/usb/lp0 | |
fi | |
fi |
NewerOlder