Skip to content

Instantly share code, notes, and snippets.

@santisbon
santisbon / Search my gists.md
Last active April 26, 2024 18:39
How to #search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@mosheeshel
mosheeshel / ConsumeHeap.java
Last active August 28, 2023 12:20
Function to fill JVM/Java Heap, Java options to automatically create a Heapdump on that event and a companion script to upload resulting files to S3
import java.io.IOException;
import java.util.Vector;
/**
* Created by moshee
* on: 07/06/17
* to compile in place: `javac ConsumeHeap.java`
* Execute: `java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/app-`date +%s`-pid$$.hprof -XX:OnOutOfMemoryError=/opt/app/bin/upload_dump_s3.sh -Xmx2m ConsumeHeap`
* HeapDumpOnOutOfMemoryError specifies to automatically create a dump when OOM occures
* HeapDumpPath supplies a path to put that file
@luzlab
luzlab / awesomeMacDeveloperSetup.sh
Last active December 6, 2021 19:29
Mac Developer Setup
# Inspired by https://gist.github.com/kevinelliott/7a152c556a83b322e0a8cd2df128235c
##############################################################################
# Install brew and base set of packages
##############################################################################
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# might need to run `sudo chown -R $USER:admin /usr/local` if install fails because of permissions issue.
brew update && brew upgrade
brew install zsh docker docker-machine docker-compose git wget jq coreutils curl binutils kafkacat bfg gitversion pkg-config cairo libffi grep gnu-sed gnu-tar
@dustinschultz
dustinschultz / osx_developer_clean_install.md
Last active March 26, 2020 16:54
OSX Developer Clean Install

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Hombrew Cask

brew tap caskroom/cask

Software

brew cask install java - installs JDK8, not just Java

brew cask install java7 - installs JDK7

@subfuzion
subfuzion / curl.md
Last active April 29, 2024 01:31
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.