Skip to content

Instantly share code, notes, and snippets.

View ip413's full-sized avatar
๐ŸŽƒ

ip413 ip413

๐ŸŽƒ
  • Poland
View GitHub Profile
@ip413
ip413 / resize-video.sh
Last active December 2, 2020 07:32
Resize video to 720p MP4 with sharpen effect
#!/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
@ip413
ip413 / reset-permissions.sh
Last active November 28, 2016 13:48
Recursively resets permissions for current folder and all files inside it to 755 and 644
#!/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 {} \;
#!/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
@ip413
ip413 / ffind
Last active August 24, 2016 11:45
#!/bin/bash
# Alias which allow to "fast" find in current dir.
# Defaults:
# - directory: current
# - case: ignore
find . -iname "*$1*"
@ip413
ip413 / static_server.js
Last active July 6, 2016 20:26 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
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);