This file contains hidden or 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
require 'json' | |
data = ARGF.read | |
json = JSON.load data | |
json = json['results']['data'] | |
json = json.select { |x| x[6] == 'v' } | |
json = json.map { |x| [x[5], JSON.load(x[7])] } | |
puts JSON.dump(json) | |
This file contains hidden or 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
package io.sqreen.powerwaf.test; | |
import org.junit.runner.notification.RunNotifier; | |
import org.junit.runners.BlockJUnit4ClassRunner; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.InitializationError; | |
import org.junit.runners.model.Statement; | |
import org.junit.runners.model.TestClass; | |
import java.lang.reflect.UndeclaredThrowableException; |
This file contains hidden or 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
const ALPHABET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
const ALPHABET_LEN = ALPHABET.length | |
const GenSQL = { | |
generate(fac) { | |
return `SELECT ${this.columns(fac * 3)} | |
FROM ${this.tables(fac)} | |
WHERE ${this.conds(fac * 3)}`; | |
}, |
This file contains hidden or 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
-----BEGIN CERTIFICATE----- | |
MIIHZzCCBU+gAwIBAgIBATANBgkqhkiG9w0BAQQFADCByzEpMCcGA1UEAxMgQ2F0 | |
YXBocmFjdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxCzAJBgNVBAYTAlBUMQ8wDQYD | |
VQQHEwZMaXNib2ExETAPBgNVBAgTCFBvcnR1Z2FsMSkwJwYDVQQKEyBDYXRhcGhy | |
YWN0IENlcnRpZmljYXRlIEF1dGhvcml0eTEcMBoGA1UECxMTQ2VydGlmaWNhdGUg | |
U2lnbmluZzEkMCIGCSqGSIb3DQEJARYVQ2F0YXBocmFjdEBuZXRjYWJvLnB0MB4X | |
DTAzMTIwNTAwMTExOVoXDTE4MTIwMTAwMTExOVowgcsxKTAnBgNVBAMTIENhdGFw | |
aHJhY3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQswCQYDVQQGEwJQVDEPMA0GA1UE | |
BxMGTGlzYm9hMREwDwYDVQQIEwhQb3J0dWdhbDEpMCcGA1UEChMgQ2F0YXBocmFj | |
dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHDAaBgNVBAsTE0NlcnRpZmljYXRlIFNp |
This file contains hidden or 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
require 'json' | |
require 'set' | |
EXCLUSIONS = Set.new([ | |
'block (2 levels) in hook_rack_request', | |
'block in request_hookpoint_method', | |
'block in define_callback_method', | |
'guard_multi_call', | |
'block (2 levels) in define_callback_method', | |
'callback_wrapper_pre', |
This file contains hidden or 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
require "execjs/runtime" | |
module ExecJS | |
class SqMiniRacerRuntime < Runtime | |
class Context < Runtime::Context | |
def initialize(runtime, source = "", options={}) | |
source = encode(source) | |
@context = ::Sqreen::MiniRacer::Context.new | |
translate do | |
@context.eval(source) |
This file contains hidden or 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
data = Import[ | |
"/home/glopes/Downloads/IP2LOCATION-LITE-DB1.IPV6.CSV"]; | |
data = Select[data, #[[3]] == "US" &] | |
netSize[a_, b_] := 128 - Log[2, b - a + 1]; | |
convert[n_] := | |
IntegerDigits[n, 16, 32] // | |
Partition[#, 4] & // | |
NestWhile[Most, #, Last[#] == {0, 0} &] & // | |
This file contains hidden or 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
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc | |
index 977eb1bd..c8e8b9c3 100644 | |
--- a/base/files/file_posix.cc | |
+++ b/base/files/file_posix.cc | |
@@ -86,7 +86,7 @@ void File::Info::FromStat(const stat_wrapper_t& stat_info) { | |
is_symbolic_link = S_ISLNK(stat_info.st_mode); | |
size = stat_info.st_size; | |
-#if defined(OS_LINUX) | |
+#if defined(OS_LINUX) || 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
require 'mini_racer' | |
c = MiniRacer::Context.new | |
res = nil | |
script = File.read('small.json'); | |
2000.times do | |
res = c.eval(script) | |
end | |
p res.size |