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
#!/usr/bin/env bash | |
# tag.sh -t [email protected] -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 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
// 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 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
ffmpeg -i in.mp4 -r 15 -vf scale=512:-1 -ss 00:00:04 -to 00:00:12 out.gif |
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 | |
ENVIRONMENT="prod"; | |
if [ "$3" != "" ]; then | |
ENVIRONMENT=$3; | |
fi | |
if [ "$2" == "" ]; then | |
echo "Repository URL is mandatory!"; |
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 | |
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 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
#!/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 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
mencoder -ovc copy -oac mp3lame GOPR3934.MP4 GP013934.MP4 GP023934.MP4 -o finalcut.avi |
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
# 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