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 | |
if [ -z "$1" ] | |
then echo " | |
File name to process required. File name shouldn't contain any whitespace chars. | |
If you want to limit cpu use for example: | |
cpulimit -e ffmpeg -l 200 # every thread has 100 'points' | |
" | |
else | |
# This line is used for testing small chunks of the file |
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 | |
# Recursively resets permissions for current folder and all files inside it to 755 and 644. | |
# No file will be executable. | |
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; |
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/ruby | |
if ARGV.length == 0 | |
puts <<HELP | |
Script extracts Kindle Clippings for specified book into external file, with formatting: | |
=== location 340 | |
Clipping content xyz | |
=== page 450 |
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 | |
# Alias which allow to "fast" find in current dir. | |
# Defaults: | |
# - directory: current | |
# - case: ignore | |
find . -iname "*$1*" |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
NewerOlder