Skip to content

Instantly share code, notes, and snippets.

View lostsnow's full-sized avatar
👻
nil

lostsnow lostsnow

👻
nil
View GitHub Profile
@lostsnow
lostsnow / binlog_time.sql
Created January 19, 2024 07:46 — forked from haitaoyao/binlog_time.sql
设置 AWS RDS binlog 保存时间
-- http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html
call mysql.rds_set_configuration('binlog retention hours', 24);
# Localization
d-i debian-installer/locale string en_US
# Keyboard
# Disable interactive keymap detection.
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
# Network
d-i netcfg/choose_interface select auto
@lostsnow
lostsnow / gist:fe284bcae51230e210e9d05652f689ed
Created September 30, 2023 11:04 — forked from gus4rs/gist:18e00a1249778b8bbbb71c3efe586ff1
Create a validator on Holesky without the Launchpad

⚠️ Do not do this for mainnet, this is a quick and insecure procedure that it's fine for Testnet only

  1. Download and install https://github.com/wealdtech/ethdo and https://github.com/ethereum/staking-deposit-cli
  2. Connect your Metamask to Holesky and generate a new address
  3. Use the address to get some 33 HolETH from https://holesky-faucet.pk910.de/
  4. Generate a new keystore for your validator using the staking-deposit-cli tool. Replace 0xADDR by your metamask address
./deposit.sh new-mnemonic --chain holesky --execution_address 0xADDR --num_validators 1
stdclass
traversable
iteratoraggregate
iterator
arrayaccess
serializable
countable
throwable
exception
errorexception

php

set current version

PHP_VERSION=7.1

ulimit

import ctypes
import os
from dongtai_agent_python.utils import scope
class CAPIPatch(object):
def __init__(self):
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
self.fh_lib = ctypes.cdll.LoadLibrary(os.path.join(base_dir, 'assess_ext/libfunchook.so.1'))
@lostsnow
lostsnow / contrast-python-2.log
Last active June 15, 2022 03:03
contrast-python.log
[, http_request {
uuid: "139904951675056"
timestamp_ms: 1654831387786
sender {
ip: "172.22.22.1"
}
receiver {
host: "172.22.22.11"
port: 5000
}
import types
def both_instance_of(first, second, klass):
return isinstance(first, klass) and isinstance(second, klass)
def update_function(old_func, new_func):
if not both_instance_of(old_func, new_func, types.FunctionType):
return
*://*.kknews.cc/*
*://*.machbbs.com/*
*://yq.aliyun.com/*
*://developer.aliyun.com/article/*
*://*.bluezerg.com/*
*://*.shuzhiduo.com/*
*://*.itread01.com/*
*://*.codenong.com/*
*://*.twblogs.net/*
*://*.shangmayuan.com/*
@lostsnow
lostsnow / mkdir.yml
Created October 4, 2020 08:45
Ansible mkdir playbook
---
- name: mkdir
hosts: node_exporters
tasks:
- name: set ubuntu user name
set_fact: sys_user=ubuntu
when: ansible_distribution == 'Ubuntu'
- name: set centos user name
set_fact: sys_user=centos