Skip to content

Instantly share code, notes, and snippets.

View scanterog's full-sized avatar

Samuel Cantero scanterog

View GitHub Profile
From 0d812b617555ece7f8fcb34bf65557fbeefe8731 Mon Sep 17 00:00:00 2001
From: Samuel Cantero <scanterog@gmail.com>
Date: Fri, 23 Jun 2023 17:29:41 -0400
Subject: [PATCH 1/1] Use associated type instead of generic for Partitioner on
ProducerContext
---
src/client.rs | 8 ++
src/producer/base_producer.rs | 143 ++++++++++++++------------------
src/producer/future_producer.rs | 19 ++---
package main
import (
"fmt"
"os"
"os/signal"
"strconv"
"syscall"
"time"
@scanterog
scanterog / main.go
Created November 2, 2020 14:48
static assignment
package main
import (
"fmt"
"log"
"os"
"os/signal"
"strconv"
"syscall"
2,3c2
< int AVX3Threshold = 4096 {ARCH diagnostic} {default}
< bool AbortVMOnCompilationFailure = false {diagnostic} {default}
---
> ccstrlist AOTLibrary = {product} {default}
6,8d4
< bool AbortVMOnSafepointTimeout = false {diagnostic} {default}
< bool AbortVMOnVMOperationTimeout = false {diagnostic} {default}
< intx AbortVMOnVMOperationTimeoutDelay = 1000 {diagnostic} {default}
67c63
@scanterog
scanterog / killsnoop.bt
Created May 14, 2019 21:23
killsnoop.bt
#!/usr/bin/env bpftrace
/*
* killsnoop Trace signals issued by the kill() syscall.
* For Linux, uses bpftrace and eBPF.
*
* USAGE: killsnoop.bt
*
* Also a basic example of bpftrace.
*
* This is a bpftrace version of the bcc tool of the same name.
{
"redis": {
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"password": ""
},
"aws": {
"access_key_id": "<access>",
"secret_access_key": "<secret>",
@scanterog
scanterog / a_checks.py
Last active October 3, 2017 20:07
Check app status in servers and add/remove accordingly
import sys
import argparse
import redis
import json
import requests
def parse_arguments():
parser = argparse.ArgumentParser(description='')
parser.add_argument(
import os
from aiohttp import web
async def build():
os.system('git pull')
os.system('rm -rf doc')
os.system('/docker/docker -I -c default --extras addHeader,noFiles'
' -x node_modules')
os.system('cp -r images doc')
print("Building has finished!")
@scanterog
scanterog / install.sh
Created September 8, 2017 17:07
Install and configure Talk
#!/bin/sh
TALK_VERSION=3.4.0
TALK_BASEDIR=/opt/talk
TALK_ROOT_URL=http://your-domain.tld
#mongo repo
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
mv 4024 org.laptop.WebActivity
mv 4026 org.laptop.community.TypingTurtle
mv 4027 org.laptop.TurtleArtActivity
mv 4028 org.laptop.sugar.ReadActivity
mv 4029 org.sugarlabs.IRC
mv 4030 org.vpri.EtoysActivity
mv 4031 com.martindengler.WirelessGraph
mv 4032 org.laptop.ImageViewerActivity
mv 4034 com.garycmartin.Moon
mv 4035 org.laptop.sugar.ReadEtextsActivity