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
// courtesy of clang | |
// https://github.com/applesrc/clang/blob/bb8f644/src/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac_spi.cc | |
enum sandbox_filter_type { | |
SANDBOX_FILTER_NONE, | |
SANDBOX_FILTER_PATH, | |
SANDBOX_FILTER_GLOBAL_NAME, | |
SANDBOX_FILTER_LOCAL_NAME, | |
SANDBOX_FILTER_APPLEEVENT_DESTINATION, |
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
mocha.setup({ | |
ui: 'bdd', | |
timeout: 1000000 | |
}); | |
describe('key-recovery', function() { | |
describe('messaging', function() { | |
var allSessions, allMessengers, del; | |
beforeEach(function() { | |
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
private static final String CR_ALG_AES = "AES/CBC/PKCS5Padding"; | |
private static final String CR_ALG_HMAC = "HmacSHA256"; | |
private static final int CR_SALT_LENGTH = 16; | |
private CryptoHeader prepareHeader() { | |
CryptoHeader header = new CryptoHeader(); | |
header.iv = new byte[16]; | |
rnd.nextBytes(header.iv); | |
header.salt = new byte[CR_SALT_LENGTH]; | |
rnd.nextBytes(header.salt); |
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
import org.bouncycastle.crypto.PBEParametersGenerator; | |
import org.bouncycastle.crypto.digests.SHA256Digest; | |
import org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator; | |
import org.bouncycastle.crypto.params.KeyParameter; | |
private final int CR_ITERATIONS = 128 * 1000; | |
public byte[] kdfPassword(String pwd, byte[] salt, int outLength) { | |
PKCS5S2ParametersGenerator gen = new PKCS5S2ParametersGenerator(new SHA256Digest()); | |
gen.init(PBEParametersGenerator.PKCS5PasswordToUTF8Bytes(pwd.toCharArray()), salt, CR_ITERATIONS); |
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
#!/bin/sh | |
FLAGS='-Wall -pedantic -std=c++11 -m32 -O0' | |
echo Compiling Emscripten... | |
mkdir -p emcc | |
/usr/local/opt/emscripten/libexec/em++ -o emcc/run.o $FLAGS -c -s DISABLE_EXCEPTION_CATCHING=0 -D_EXPORTING -D_REENTRANT -Isrc -Ithirdparty run.cpp | |
/usr/local/opt/emscripten/libexec/em++ -o emcc/tests_run.html $FLAGS -s DISABLE_EXCEPTION_CATCHING=0 emcc/run.o | |
echo Compiling native... |
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
$("#droparea").bind("drop", function(e){ | |
files = e.dataTransfer.files; | |
e.preventDefault(); | |
$.each(files,function(index,file){ | |
var form = new FormData(); | |
form.append("myFile", file); | |
$.ajax({ | |
type: "POST", |
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
(defn plesk | |
([request item] (plesk request item {})) | |
([request item kwargs] | |
(let [rnd-box (fn [word] | |
(let [rnd-gen (new Random (.hashCode word)) | |
gen-color (fn [] (+ 155 (.nextInt rnd-gen 100)))] | |
[:span {:style | |
(str "padding: " | |
(.nextFloat rnd-gen) "ex " | |
(.nextFloat rnd-gen) "ex " |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\CSharp\Options\Formatting] | |
"NewLines_Braces_AnonymousMethod"=dword:00000000 | |
"NewLines_Braces_ControlFlow"=dword:00000000 | |
"NewLines_Braces_AnonymousTypeInitializer"=dword:00000000 | |
"NewLines_Braces_ObjectInitializer"=dword:00000000 | |
"NewLines_Braces_LambdaExpressionBody"=dword:00000000 | |
"NewLines_Keywords_Else"=dword:00000000 | |
"NewLines_Keywords_Catch"=dword:00000000 |
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
VectorView = { | |
'path': r'src\Core\VectorView', | |
'proj': r'VectorView', | |
'new_name': 'MoNET_VectorView', | |
'cpp_include': [r'..\..\External\libpng-1.2.23', r'..\..\External\zlib'], | |
'link_include': [r'..\..\External\libpng-1.2.23\bin\visualc9'], | |
'libs': ['libpng.lib', 'zlib.lib'], | |
'exclude': ['hipng.cpp']} |
NewerOlder