Skip to content

Instantly share code, notes, and snippets.

View vtypal's full-sized avatar

Vangelis Typaldos vtypal

View GitHub Profile
require 'rake'
require 'logger'
require 'pdf-reader'
#Usage
# [1] Create a new directory and copy pdf2txt.rb in this directory.
# [2] Insert also your pdf files in this directory.
# For every pdf file in this directory, this script will create a new textfile extracting the text from your original pdf file.
# File paths nad Log paths
require 'rubygems'
require 'innate'
class Innatecookies
include Innate::Node
map '/'
provide :html, :engine => :Etanni, :type => 'text/html'
@@header =<<-HEADER
<?xml version="1.0" ?>
@vtypal
vtypal / gist:149018
Created July 17, 2009 11:49
Innate::Request.current.env
require 'rubygems'
require 'innate'
class Demo
include Innate::Node
map '/'
provide :html, :engine => :Etanni, :type => 'text/html'
@@header =<<-HEADER
<?xml version="1.0" ?>
http://mikenaberezny.com/2008/04/28/parsing-quoted-strings-in-ruby/
http://henrik.nyh.se/2008/03/flickr-style-tag-splitting-in-ruby
Shellwords::shellwords('foo "bar baz" qux')
=> ["foo", "bar baz", "qux"]
require 'rubygems'
require 'innate'
class Rpanel
Innate.node '/'
provide :html, :engine => :Etanni, :type => 'text/html'
def index(lang="en")
if request.post?
@user, @pass = request[ 'user', 'pass']

ffmpeg short guide

Supported input formats

$ ffmpeg -formats

Sub-clip Creation

$ ffmpeg -i input_file -ss timecode -t timecode -vcodec copy -acodec copy  output_file 

ex:
ffmpeg -i recorder_A.vob -ss 00:03:00 -t 00:30:15 -vcodec mpeg4 -acodec aac recorder_A.mp4

Audio Volume Modification

Creating Device Special Files with mknod

/usr/sbin/mknod <file_name> b|c <major#> <minor#>
  • Name the file something easily associated with the device
  • Use b for block device special file or c for character device special file. If the device is a block type device such as a tape or disk drive which needs both cooked and raw special files, the type is b. All other devices are character type devices, such as terminal and pseudo devices, and are type c.
  • Set the major and minor number for the device as reported from `lsdev`. The major device number is an integer number which tells the kernel which device driver entry point to use. The minor device number tells the kernel which subunit the node corresponds to on the device.

For example let’s create a node /dev/xvd as a block device:

#vtypal#############################################02/23
# My SciTEGlobal.properties file for win32 platforms(v_3_3_5)
##########################################################
# Global initialisation file for SciTE
# For Linux, place in $prefix/share/scite
# For Windows, place in same directory as SciTE.EXE (or Sc1.EXE)
# Documentation at http://www.scintilla.org/SciTEDoc.html
# Globals
#~ +++++++++++++++++++++++++++++++++++++++++++++++++++
#~ Installing RedCloth on Windows / win32 platforms
#~ ++++++++++++++++++++++++++++++++++++++++++++++++++++
#~ Find all the available RedCloth versions with a gem query
#~ C:\>gem19 query --remote -d -a -n RedCloth
=begin