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
| import gc | |
| import sys | |
| import types | |
| import unittest.mock | |
| from typing import Any | |
| from typing import Callable | |
| from typing import Generator | |
| from typing import Optional | |
| from typing import TYPE_CHECKING |
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
| import tracer, { Span } from "dd-trace"; | |
| import pg from "pg"; | |
| /** | |
| * Patches pg.Pool to add tracing. | |
| */ | |
| export function patchPgPool(serviceName: string) { | |
| const name = "pg-pool.connect"; | |
| const service = `${serviceName}-postgres`; |
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
| import _, { range } from "lodash"; | |
| import os from "os"; | |
| import { TestedLogger } from "./TestedLogger"; | |
| describe("LogStream", () => { | |
| it("should write synchronously", () => { | |
| // Arrange | |
| const testedLogger = new TestedLogger(); | |
| // Act |
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
| ''' | |
| INSTALLING | |
| curl --create-dirs -o ~/.lldb/cfdata.py https://gist.githubusercontent.com/ikonst/364af37c44e5f549b722/raw/cfdata.py \ | |
| && echo 'command script import ~/.lldb/cfdata.py' >> ~/.lldbinit | |
| USING | |
| (lldb) cfdata_save some_cfdata /Users/john/foo | |
| (lldb) cfdata_save some_nsdata /Users/john/bar |
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
| from typing import Any | |
| from typing import Dict | |
| from typing import Type | |
| from typing import TYPE_CHECKING | |
| from typing import TypeVar | |
| | |
| from pynamodb.attributes import MapAttribute | |
| | |
| | |
| MapT = TypeVar('MapT', bound=MapAttribute) |
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
| set iAdRootDSE = GetObject("LDAP://RootDSE") | |
| namingContext = iAdRootDSE.Get("defaultNamingContext") | |
| If WScript.Arguments.Count = 1 Then | |
| namingContext = WScript.Arguments.Item(0) | |
| Else | |
| Wscript.Echo "Usage: ActiveDirectoryToVcf.vbs [Naming Context]" | |
| Wscript.Echo "Default path is " & namingContext | |
| End If |
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
| /* | |
| * Patches ELF (EABI) ARM attribute Tag_ABI_PCS_wchar_t. | |
| * | |
| * This utility's chief purpose is to remove the flag indicating sizeof(wchar_t) | |
| * from ARM EABI binaries -- or more precisely, setting it to 0 (= undefined). | |
| * | |
| * It is useful to mark libraries which don't use wchar_t at all as wchar_t-width-agnostic. | |
| * This way, they can be linked to both sizeof(wchar_t)=2 and sizeof(wchar_t)=4 programs | |
| * without any warnings. | |
| * |
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
| // Adds IDA symbols as WinDbg synthetic symbols | |
| // | |
| // Original code by 'blabb'. | |
| // | |
| // See: | |
| // http://www.woodmann.com/forum/entry.php?262-addsym-windbg-extension-%28extension-to-load-names-from-ida-to-windbg%29 | |
| // http://reverseengineering.stackexchange.com/questions/3850/importing-list-of-functions-and-addresses-into-windbg | |
| #include <engextcpp.hpp> |
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/sh -e | |
| # Converts a Quicktime movie to a GIF aniamtion. | |
| # Useful for screen recordings. | |
| # Preliminary step with palette required to make it look good | |
| # without dithering artifacts. | |
| FPS=10 | |
| PALETTE=$(mktemp).png | |
| MOV=$1 |
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
| """ | |
| Implements a behavior similar to: | |
| - Go srv's cancelation of context on downstream disconnect | |
| - PHP (unless `ignore_user_abort` is true) | |
| """ | |
| import gevent.monkey | |
| gevent.monkey.patch_all() | |
| from contextlib import contextmanager | |
| from flask import Flask |
NewerOlder