Skip to content

Instantly share code, notes, and snippets.

View abstractj's full-sized avatar

Bruno Oliveira da Silva abstractj

View GitHub Profile
@abstractj
abstractj / shot.js
Created July 25, 2013 20:07 — forked from ahomu/shot.js
console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://localhost:1947/';
page.viewportSize = {
width: 1024,
height: 768
};
page.open(url, function (status) {
//Page is loaded!
var iz, i = 0, queue = {};
@jancborchardt
jancborchardt / Dealing with issues.md
Last active January 24, 2022 23:07
Dealing with issues

Dealing with issues

Try to reproduce issues

Go through the new issues and try to reproduce them. It’s important to get additional info, logs, and test if an issue occurs on different platforms. That helps us identify the source of the problem.

Triage issues

  • if there’s more info needed, ask the reporter to use the issue template
  • assign relevant labels

User Management for the Aerogear Unfied Push Server

Introduction

The goal of this document is to describe how the User Management will be implemented in the Unified Push Server. Currently there is only one user created by default when installing UPS. Having the possibility to create multiple users is a "Must Have" and should be manageable from the Admin Console. Some roles should also be introduced

Roles / Permissions

//this is using promises.
dm.stores.demo.open().then( function( value ) {
var data = [
{
"id": 1,
"name": "Lea",
"type": "Skywalker"
}
];
@mweisel
mweisel / create-bridge-netif.sh
Last active November 19, 2024 02:01
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() {
@subudeepak
subudeepak / WebSockets.md
Last active December 4, 2024 13: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
@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
@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`
}
<?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
public class AddUserExample {
public static void main(String[] args) {
Settings settings =
new SettingsBuilder()
.logging(false)
.readInputrc(false)
.disableCompletion(true)
.disableHistory(true)