Skip to content

Instantly share code, notes, and snippets.

@maabed
maabed / kafka-del-topics.sh
Created February 20, 2023 00:09 — forked from hartfordfive/kafka-del-topics.sh
Script to delete all kafka topics on a given cluster
#!/bin/bash
TOPICS=$(kafka-topics --zookeeper [ZK_IP]:2181/kafka --list )
for T in $TOPICS
do
if [ "$T" != "__consumer_offsets" ]; then
kafka-topics --zookeeper [ZK_IP]:2181/kafka --delete --topic $T
fi
done

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3
@maabed
maabed / gist:4565cb224b90a6e20760
Created December 7, 2015 21:52 — forked from riosc/gist:4539602
How to Empty Caches and Clean All Targets Xcode
http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. Remove all its contents because there's a bug where Xcode will run an old version of your project that's in there somewhere. (Xcode 4.2 will show you the Derived Data folder: choose Window > Organizer and switch to the Projects tab. Click the right-arrow to the right of the Derived Data folder name.)
In the simulator, choose iOS Simulator > Reset Content and Settings.
Finally, for completeness, you can delete the contents of /var/folders; some caching happens there too.
@maabed
maabed / gist:d5fffb82a004ab92f926
Last active April 8, 2018 02:48
MongoDB error
INFO: Attaching persistent storage.
INFO: Extracting source code to application environment.
INFO: Found package.json file: /package.json
INFO: Node version not specified in package.json, using latest stable version.
INFO: Initializing Node v0.10.32
INFO: Running npm install.
INFO: Registry: http://registry.npmjs.org
npm WARN package.json [email protected] No repository field.
npm WARN engine [email protected]: wanted: {"node":"~0.8.0"} (current: {"node":"0.10.32","npm":"1.4.28"})