Skip to content

Instantly share code, notes, and snippets.

View abstractj's full-sized avatar

Bruno Oliveira da Silva abstractj

View GitHub Profile
# is the url for retrieve the openid configuration - normally the <server>/auth/realm/<realm_name>
discovery-url: http://localhost:8180/auth/realms/summit
# the client id for the 'client' application
client-id: go-rest
# the interface definition you wish the proxy to listen, all interfaces is specified as ':<port>'
listen: 127.0.0.1:4000
# log all incoming requests
enable-logging: true
# log in json format
#!/bin/bash
oc cluster down
docker rm -f bindmountproxy
@granella
granella / generate-certificate-chain.sh
Created June 27, 2016 11:15
Create self-signed certificate with root and ca for development
#!/bin/bash
rm *.jks 2> /dev/null
rm *.pem 2> /dev/null
echo "===================================================="
echo "Creating fake third-party chain root -> ca"
echo "===================================================="
# generate private keys (for root and ca)
public class AddUserExample {
public static void main(String[] args) {
Settings settings =
new SettingsBuilder()
.logging(false)
.readInputrc(false)
.disableCompletion(true)
.disableHistory(true)
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright Red Hat, Inc., and individual contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@goldmann
goldmann / .zshrc
Last active June 24, 2019 06:18
Docker aliases / helper function
alias dip="docker inspect -f '{{ .NetworkSettings.IPAddress }}'"
dssh() {
PID=$(docker inspect --format {{.State.Pid}} $1)
sudo /usr/bin/nsenter --target $PID --mount --uts --ipc --net --pid env -i - $(sudo cat /proc/$PID/environ | xargs -0) bash
}
drmiall() {
docker rmi `docker images -q -f dangling=true`
}
@eripa
eripa / bridge.sh
Created April 25, 2014 07:04
OS X network bridge
#! /bin/sh
# ######################################
# coded by Nat!
# 2013 Mulle kybernetiK
# GPL
command=${1:-start}
shift
proxyarp=${1:-no}
shift
@subudeepak
subudeepak / WebSockets.md
Last active May 31, 2024 09:36
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@mweisel
mweisel / create-bridge-netif.sh
Last active August 25, 2021 07:35
A basic script to create bridge network interfaces for VMware Fusion and GNS3 integration for Mac OS X.
#!/usr/bin/env bash
# NAME: create-bridge-netif.sh
# AUTHOR: Marc Weisel
# DATE: 03/04/2014
# NOTES: Tested with Mac OS X 10.9 (Mavericks); Bash v3.2.51(1)-release
# FUNCTIONS
## Is the TAP network interface available?
tap_exist() {
//this is using promises.
dm.stores.demo.open().then( function( value ) {
var data = [
{
"id": 1,
"name": "Lea",
"type": "Skywalker"
}
];