Skip to content

Instantly share code, notes, and snippets.

View torque's full-sized avatar

T torque

View GitHub Profile
diff --git a/wscript b/wscript
index 0ef4fc3..b5db61a 100644
--- a/wscript
+++ b/wscript
@@ -71,13 +71,13 @@ def configure_gcc(conf):
add_options(["CFLAGS", "CXXFLAGS"],
["-fPIC", "-Wall", "-Wextra", "-Wno-unused-parameter",
"-fvisibility=hidden", "-fvisibility-inlines-hidden",
- "-Werror", "-std=c++11"])
+ "-std=c++11"])
diff -r 514640c6cbd8 Makefile
--- a/Makefile Sat Apr 12 16:59:09 2014 -0700
+++ b/Makefile Mon Apr 14 23:35:03 2014 -0700
@@ -2,13 +2,19 @@
# Override the default compiler with `make CXX=g++` or so
# Build on *nix with `make EXE=`
WARNINGS := -pedantic -Wall
+CC := clang
CXX := clang++
-CXXFLAGS := $(WARNINGS) -std=c++11
#!/usr/bin/env python3
import os, sys
import vapoursynth as vs
def progress( current_frame, total_frames ):
print( "\rProgress: {0}/{1}".format( current_frame, total_frames ), file=sys.stderr, end='' )
core = vs.get_core( )
fuckWindows = ( logString ) ->
ffi.cdef [[int WideCharToMultiByte( unsigned int, unsigned int, const char*, int, char*, int, void*, void* );]]
CP_UTF8 = 65001
logLength = math.ceil #logString/2
buffSize = 1 + ffi.C.WideCharToMultiByte CP_UTF8, 0, logString, logLength, nil, 0, nil, nil
if 0 == buffSize
error "Shit's fucked i aint helping."
utf8String = ffi.new "char[?]", buffSize
status = ffi.C.WideCharToMultiByte CP_UTF8, 0, logString, logLength, utf8String, buffSize, nil, nil
inspectorExample = ( sub, sel, act ) ->
dialogStart = -1
for i = 1, #sub
if 'dialogue' == sub[i].class
dialogStart = i
break
if -1 == dialogStart
log.windowError( "This script does not appear to have any dialogue lines." )
// clang++ BadTimer.cpp -fPIC -shared -O3 -std=c++11 -o BadTimer.dylib
#include <chrono>
class BadTimer {
private:
std::chrono::high_resolution_clock::time_point startTime;
std::chrono::high_resolution_clock::time_point endTime;
std::chrono::duration<double> timeSpan;
public:
BadTimer( void );
convertClipToFP = ( clip ) ->
-- only muck around with vector clips (convert scaling factor into floating point coordinates).
unless clip\match "[%-%d%.]+, *[%-%d%.]+"
-- Convert clip with scale into floating point coordinates.
clip = clip\gsub "%((%d*),?(.-)%)", ( scaleFactor, points ) ->
if scaleFactor ~= ""
scaleFactor = tonumber scaleFactor
points = points\gsub "([%.%d%-]+) ([%.%d%-]+)", ( x, y ) ->
x = Math.round tonumber( x )/(2^(scaleFactor - 1)), 2
@torque
torque / bd batch notes
Created September 25, 2011 05:33 — forked from komori/bd batch notes
uguu~ Working BD batch notes
Episode 1:
-Matroska header title
-Add italic font
-Add all fonts to 1080p
-Episode 1 -> Item 1 at the beginning
-Title top and bottom
-Next: Item 1
-Kerning: yes
Episode 2:
@torque
torque / gist:2361721
Created April 11, 2012 19:28
fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Font directory list -->
<dir>C:\fonts\</dir>
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
@torque
torque / fontforge.bat
Created May 5, 2012 07:33
batch file for launching FontForge on windows
:: Slightly modified fontforge.bat from this fine fellow's (http://www.geocities.jp/meir000/fontforge/) cygwin fontforge builds
:: Mostly fixes opening fonts to work with multiple fonts, even ones with spaces in their paths.
@echo on
set PATH=%~dp0cygwin\bin;%PATH%
set CYGWIN=nodosfilewarning
set HOME=%~dp0
set DISPLAY=:9.0
set AUTOTRACE=potrace