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
#!/bin/bash | |
# https://www.openwall.com/lists/oss-security/2024/03/29/4 | |
set -eu | |
# find path to liblzma used by sshd | |
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')" | |
# does it even exist? | |
if [ "$path" == "" ] |
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
<?php | |
// ... | |
function window(array $array, int $width): array { | |
$results = []; | |
$count = count($array); | |
if ($count < $width) { | |
throw new InvalidArgumentException('Not enough items in array'); |
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
#!/usr/bin/env php | |
<?php | |
$REF_PATTERN = "[A-Z]{3,}-\\d+"; | |
$branch = exec("git rev-parse --abbrev-ref HEAD"); | |
if (preg_match("/(bug|feature)\\/($REF_PATTERN)/", $branch, $matches)) { | |
$msg = file_get_contents($argv[1]); | |
$ticket = $matches[2]; |
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
/** | |
* Bastien Clément | |
*/ | |
import java.util.*; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
class Mapper { |
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
/** | |
* TE3 | |
* Bastien Clément | |
* 26.04.2016 | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
#include <vector> |
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
function(e, time, event, _, source, sourceName, _, _, dest, destName, _, _, spell, spellName) | |
if spell == 185014 and source and dest then | |
local Hud = FS.Hud | |
local key = source .. "_chaos_target" | |
if event == "SPELL_AURA_APPLIED" then | |
Hud:RemovePoint(key) | |
local source_pt = Hud:GetPoint(source) | |
if not source_pt then return end |
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
/// <summary> | |
/// 10^0..10^8 (NumDigits used in the HOTP) | |
/// </summary> | |
private static readonly int[] DigitsPower = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000}; | |
private static int DynamicTruncate(byte[] hash) | |
{ | |
int offset = hash[hash.Length - 1] & 15; | |
return ((hash[offset] & 127) << 24) + ((hash[offset + 1] & 255) << 16) + ((hash[offset + 2] & 255) << 8) + |
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
<?php | |
function preg_replace_safe($search, $replace, $subject, $evaluator = NULL) { | |
if (is_null($evaluator)) { | |
// A custom evaluator | |
// function($c) { return eval($c); } | |
// is required if the replacement code uses the $this reference. | |
$evaluator = function($code) { return eval($code); }; | |
} | |
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
--------------------------------------------------------------------- | |
| The CASC (Content Addressable Storage Container) Filesystem | | |
| Warlords of Draenor Alpha, Build 6.0.1.18125 | | |
| Written April 14th, 2014 by Caali | | |
| Version 1.2 | | |
--------------------------------------------------------------------- | |
Distribution and reproduction of this specification are allowed without | |
limitation, as long as it is not altered. Quotation in other works is | |
freely allowed, as long as the source and author of the quote are stated. |
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
var ip = require('ip'); | |
console.time("load"); | |
var list = require("./bt_level1.js").map(function(block) { | |
try { | |
block.start = ip.toLong(block.start); | |
block.end = ip.toLong(block.end); | |
} catch(e) { | |
console.log(e, block); | |
process.exit(0); |
NewerOlder