Skip to content

Instantly share code, notes, and snippets.

@TaoK
TaoK / Diff.cs
Created May 8, 2012 08:01
C# port of JS 3-way merge implementation in Synchrotron
// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net>
// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net>
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@SeargeDP
SeargeDP / ScriptEngine.cs
Last active July 18, 2022 15:54
Sandboxed scripting environment for C# based on Mono.CSharp for .NET 3.5 (works in Unity3D projects)
// Written by Michael 'Searge' Stoyke in 03/2015
// Released as public domain, do whatever you want with it!
using System;
using System.IO;
using System.Reflection;
using System.Text;
using Mono.CSharp;
namespace GameLibrary {
@imneme
imneme / randutils.hpp
Last active March 28, 2024 20:43
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Melissa E. O'Neill
*
@kuntau
kuntau / yify.md
Last active May 23, 2024 19:00
YIFY's Quality Encoding

For those that want to keep the YTS going (No, IDGAF about people that don't care for YTS quality) get HandbrakeCLI https://handbrake.fr/downloads... and use the following settings:

user@user:~$HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Reason to use CLI over GTK has to do with lack of support for advanced settings for Handbrake GTK

** Don't Re-encode already shitty encodes...get good source!**

@manfredk
manfredk / CronTab-Expander.sql
Last active December 1, 2022 11:39
Expand CronTab expressions with SQL / T-SQL
USE Exercises
GO
/* ***********************************************************************************************
*
* CRONTAB EXPANDER
*
* ***********************************************************************************************/
/**************************************************************************************************
anonymous
anonymous / pantheon.py
Created August 4, 2017 15:15
Procedural Pantheon by acidicrhyme
# WordNet/Jung Pantheon Generator copyright 2017 Adam Biltcliffe
# Released under the terms of the MIT License - https://opensource.org/licenses/MIT
from nltk.corpus import wordnet as wn
import textblob as tb
import random
import graphviz
# convenience methods for identifying seed synsets
def s(word):
@LSTANCZYK
LSTANCZYK / CronTab-Expander.sql
Created October 25, 2018 20:02 — forked from manfredk/CronTab-Expander.sql
Expand CronTab expressions with SQL / T-SQL
USE Exercises
GO
/* ***********************************************************************************************
*
* CRONTAB EXPANDER
*
* ***********************************************************************************************/
/**************************************************************************************************
"Test Skill"
[Prototype]
Name: Skill:Test
Singleton: true
[SkillScript]
Script: {
SystemContainer.MessageSystem:Write('Hello world')
}
[Description]
Name: Test Skill