Skip to content

Instantly share code, notes, and snippets.

# ==== twisted/plugins/finger_plugin.py ====
# This snippet shows how to configure Twisted plugins to use custom logging.
# This is a modification of a 'finger' example by Chris Miles at
# http://chrismiles.livejournal.com/23399.html
#
# It's kind of a dirty monkey patching hack, but I don't know how to
# configure logging in plugins until this ticket is resolved:
# http://twistedmatrix.com/trac/ticket/638
#
# I change logging from the default LogFile to DailyLogFile, and also
;;
;; A way to use Google's gjslint from Emacs
;; Copyright 2010 (c) Valeriy Zamarayev
;;
;; Put this into your .emacs
;; (require 'gjslint)
;; (add-hook 'js-mode-hook
;; (lambda () (flymake-mode t)))
@valeryz
valeryz / pinversions.py
Created June 23, 2011 08:59
Pinning dependencies versions in buildout
import zc.buildout.easy_install
import zc.recipe.egg
import os
import os.path
import sys
import fileinput
import pkg_resources
class PinVersions:
"""
@valeryz
valeryz / test.ts
Created March 17, 2024 19:13
Sending a Safe transaction in typescript (taken from Hardhat Unit test)
it("Should succeed verification of a basic transaction", async function () {
const nonce = await safe.getNonce();
const threshold = await safe.getThreshold();
const safeTransactionData : SafeTransactionData = {
to: ethers.ZeroAddress,
value: "0x0",
data: "0x",
operation: 0,
// default fields below