This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Returns a Base64-encoded string is safe to embed in URLs. */ | |
function base64UrlEncode(str: string) { | |
return btoa(str).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); | |
} | |
/** | |
* Deocdes a string of URL-safe, Base64-encoded data into bytes, and encodes | |
* those bytes into a string using Latin-1 (ISO-8859-1). | |
* | |
* The input data is typically encoded with a `base64UrlEncode` method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkvmerge --default-language eng -o output_file.mkv input_file.mkv --language 0:eng english_subs.srt --language 0:fre french_subs.srt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://lightyearsoftware.com/2013/03/xcode-hard-mode/ | |
Xcode 5 > select project > Build Settings > Apple LLVM Custom Compiler Flags > Other C Flags | |
-Weverything -Werror -Wno-pedantic -Wno-objc-missing-property-synthesis -Wno-direct-ivar-access -Wno-arc-repeated-use-of-weak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Casero.Web.Mvc | |
{ | |
using System; | |
using System.Collections.Specialized; | |
using System.Web; | |
using System.Web.Helpers; | |
using System.Web.Mvc; | |
// Checks the User's CSRF token | |
// http://haacked.com/archive/2011/10/10/preventing-csrf-with-ajax.aspx |