Skip to content

Instantly share code, notes, and snippets.

@rondinif
rondinif / check-java12-env
Created April 14, 2019 11:30
command line setup of [ openjdk version "12" ] on [ Mac OS X 10.14.3 ]
$ java -XshowSettings -version
Picked up JAVA_TOOL_OPTIONS: -Duser.country=US -Duser.language=en
VM settings:
Max. Heap Size (Estimated): 4.00G
Using VM: OpenJDK 64-Bit Server VM
Property settings:
awt.toolkit = sun.lwawt.macosx.LWCToolkit
file.encoding = UTF-8
file.separator = /
@kwart
kwart / elytron-ssl.cli
Created May 17, 2017 15:00
WildFly Elytron - Full SSL with fallback (Client Cert authentication with fallback to username / password authentication.)
# Paths
./path=elytron.project:add(path=/home/darranl/src/wildfly10/wildfly-elytron)
./path=elytron.project.jks:add(path=src/test/resources/ca/jks, relative-to=elytron.project)
./path=elytron.project.properties:add(path=src/test/resources/org/wildfly/security/auth/realm, relative-to=elytron.project)
# KeyStores
./subsystem=elytron/key-store=localhost:add(type=jks, relative-to=elytron.project.jks, path=localhost.keystore, credential-reference={clear-text=Elytron})
./subsystem=elytron/key-store=beetles:add(type=jks, relative-to=elytron.project.jks, path=beetles.keystore, credential-reference={clear-text=Elytron})
@P7h
P7h / ReadPropertiesWithGuava.java
Last active September 5, 2019 16:30
Load a properties file using Guava.
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
import com.google.common.io.ByteSource;
import com.google.common.io.Resources;
/**
* Reads a properties file and print all the key value pairs to the console.
@fenderstic
fenderstic / BuildingGstreamerOnOSX(ElCapitan).md
Last active September 25, 2019 04:47
A walkthrough 'Building GStreamer On OSX (El Capitan)'

The document for building gstreamer from source is not found. So, I decided to upload this document for beginners of gstreamer. Please DO NOT take this document SERIOUSLY : ) It might have some mistakes, cause I'm a newbie as you.

Get started with XCODE and BREW

I had tried to install all kind of build tools with source build and installation. And I realized it was stupid things that waste my priceless time.

  • XCODE install on terminal
    • xcode-select --install
  • Brew install on terminal
@jwalton
jwalton / Dashing EC2.md
Last active October 10, 2019 04:47
EC2 CloudWatch stats for Dashing

Get EC2 CloudWatch stats and graph them in Dashing.

CollectorRegistry collectorRegistry = new CollectorRegistry();
PrometheusMeterRegistry micrometerRegistry =
new PrometheusMeterRegistry(PrometheusConfig.DEFAULT, collectorRegistry, Clock.SYSTEM);
micrometerRegistry
.config()
.commonTags()
.commonTags(
"application",
metadata.getName(),
"env",
@ryenus
ryenus / gist:1518596
Created December 25, 2011 01:15
Using ruby in place of grep/awk/sed like perl

With options -e, -n, -p, perl can do what grep/awk/sed can, what about ruby?

Let's take the result of ls -l as input and process it with ruby

grep with ruby

\ls -l | ruby -ne 'print if /^d/'

awk with ruby

\ls -l | ruby -ne 'puts split(/\s+/).last if /^d/'

@tbonesteaks
tbonesteaks / mac-vagrant-howto.rst
Last active April 19, 2021 12:10
brew, vagrant, virtualbox, and vagrant file howto...

Vagrant on Mac w Virtualbox

NSoT engineers have built Vagrantfiles for you to deploy NSoT software in a multitude of linux environments. This tutorial will help you load a Macintonsh computer (OS X) with Vagrant, Virtual Box, and dependencies so that you can start virtual servers and test the software.

NSoT publishes complete installation instructions for linux distributions, branch versions, and Vagrantfiles in addition to, not an alternative for the pip install method:

$ pip-install nsot
@soultech67
soultech67 / ruby_readline_issue.md
Last active June 6, 2022 21:18
ruby bundler: Sorry, you can't use byebug without Readline

Preamble

On OS/X Sierra, after recently running a brew update I started receiving the error message Sorry, you can't use byebug without Readline when trying to run some rake tasks in my ruby project folder. I observed this in projects and gems that include byebug or pry in their Gemfile or gem.spec. I've found in my googling that many begin encountering this error message after running a brew update but there are other triggering conditions as well.

>> rake aws:show_config
WARN: Unresolved specs during Gem::Specification.reset:
      mime-types (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
 Sorry, you can't use byebug without Readline. To solve this, you need to
# see: https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html
LOGLEVELS = %w[DEBUG INFO WARN ERROR FATAL UNKNOWN].freeze
LOGGER = Logger.new(STDOUT)
level ||= LOGLEVELS.index ENV.fetch("LOG_LEVEL","WARN") # default to WARN index: 2
level ||= Logger::WARN # FIX default in case of environment LOG_LEVEL value is present but not correct
LOGGER.level = level
# Usage:
# before launching the program:
# $ export LOG_LEVEL=DEBUG