Skip to content

Instantly share code, notes, and snippets.

@cloudrain21
cloudrain21 / ajax_node_express_array_json_text.js
Created April 18, 2016 21:07
Ajax client and nodejs express server exchange json and text data
// ajax client
$(".download-selected-list").click( function() {
$.ajax( {
type: "post",
url:'http://localhost:3000/ajax-mongo/downloadImagesZip',
contentType: 'application/json', // to server
data: JSON.stringify({"arr":arrSelectedSrc}),
dataType: 'text', // from server
// dataType: 'binary', // from server
@cloudrain21
cloudrain21 / benchmark-commands.md
Created March 26, 2020 03:39 — forked from ueokande/benchmark-commands.md
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@cloudrain21
cloudrain21 / git.migrate
Created June 16, 2020 03:22 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.