Skip to content

Instantly share code, notes, and snippets.

View jizg's full-sized avatar
🌈

Alex Ji jizg

🌈
View GitHub Profile
@rmoff
rmoff / ccloud_connect.adoc
Created September 26, 2019 11:18
Configuring Kafka Connect with Confluent Cloud

Configuring Kafka Connect with Confluent Cloud

So you want to connect Kafka Connect to Confluent Cloud? Here’s how.

Overview

  1. Configure the worker

  2. Pre-create any topics that your source connector will write to (since auto-topic creation is not enabled on Confluent Cloud)

@radleta
radleta / how-to-win-rsync-from-cmd.md
Last active August 9, 2023 15:46
Step-by-step how to use rsync with git bash from Windows command prompt

Note: This works all except for the shell script part. Need to figure that out. You can do it interactively just not from the command prompt.

  1. Install Git
  2. Install Git Bash via Git Tortoise install
  3. Added HOME=/c/Users/$USERNAME to C:\Program Files\Git\etc\profile
  4. See https://stackoverflow.com/questions/32232978/change-the-location-of-the-directory-in-a-windows-install-of-git-bash
  5. Download rsync.exe from https://repo.msys2.org/msys/x86_64/rsync-3.2.3-2-x86_64.pkg.tar.zst use 7-zip to decompress
  6. See https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows/
  7. Put rsync.exe into C:\Program Files\Git\usr\bin
  8. Open Git Bash and create a key file using ssh-keygen
@rmoff
rmoff / 00_numeric.mapping_README.md
Last active August 11, 2023 02:58
Kafka Connect JDBC connector - numeric.mapping
@mgpradeepa
mgpradeepa / Kafka_setup_debug
Last active March 14, 2023 08:22
Kafka how to configure and debug when in need what to use to check.
OS: Centos
Requisite: JAVA 7+8
sudo vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk
export JRE_HOME=/usr/lib/jvm/jre
Download Kafka from any of the given website: the one use here is kafka_2.11-0.10.1.1.tgz
Untar: tar -xvf kafka_2.11-0.10.1.1.tgz
sudo mv kafka_2.11-0.10.1.1.tgz /opt
@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active October 14, 2024 00:44
Macbook Pro 2011 - Disable AMD GPU

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@Tushar-N
Tushar-N / pad_packed_demo.py
Last active October 27, 2024 15:17
How to use pad_packed_sequence in pytorch<1.1.0
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
seqs = ['gigantic_string','tiny_str','medium_str']
# make <pad> idx 0
vocab = ['<pad>'] + sorted(set(''.join(seqs)))
# make model
@SriramKeerthi
SriramKeerthi / Load.java
Last active September 27, 2022 09:25
Simple CPU Load Generator in Java
package com.caffinc.grex.core;
/**
* SPDX-License-Identifier: MIT
*
* Generates Load on the CPU by keeping it busy for the given load percentage
* @author Sriram
*/
public class Load {
/**
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active October 30, 2024 08:09 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话: