Skip to content

Instantly share code, notes, and snippets.

http://jsbin.com/rabojovezose/11/edit
http://jsbin.com/yayeduximibu/16/edit
http://jsbin.com/jinubu/6/edit
http://jsbin.com/goxosi/8/edit
--
-- convertMod2Dv.app
--
-- a simple apple script applet to convert .mod files to .dv files
-- this is an essential step for those of us who own DV video cameras
-- that use this .mod file format, but would also like to edit those videos
-- in iMove HD or other editing apps. This applet was developed solely to
-- provide drag-n-drop functionality to the command line tool ffmpeg2.
-- It supports dragging individual files or folders of files, etc.
--
@matma
matma / convert_to_utf8.ps1
Last active December 23, 2015 21:39
Converts files to UTF8
function Get-FileEncoding
{
[CmdletBinding()] Param (
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string]$Path
)
[byte[]]$byte = get-content -Encoding byte -ReadCount 4 -TotalCount 4 -Path $Path
if ( $byte[0] -eq 0xef -and $byte[1] -eq 0xbb -and $byte[2] -eq 0xbf )
{ Write-Output 'UTF8 BOM' }
@matma
matma / gist:6410749
Last active December 22, 2015 03:29
Compute CRC for POSNET fiscal printers
private static readonly Encoding encoding = Encoding.GetEncoding( 1250 );
static readonly ushort[] Table = new ushort[256];
static bool przeliczone = false;
void fillTable() {
for( int i = 0; i < Table.Length; ++i ) {
ushort num2 = 0;
ushort num3 = (ushort)( i << 8 );