Skip to content

Instantly share code, notes, and snippets.

//Copy runtime libraries to lib source folder
task copyRuntimeLibs(type: Copy) {
into "lib"
from configurations.testRuntime, configurations.runtime
}
@mbodo
mbodo / Git - git.migrate
Last active September 17, 2016 15:22 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@mbodo
mbodo / Java - introrx.md
Last active September 17, 2016 15:23 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@mbodo
mbodo / Linux - RHEL Conf Tips.md
Last active October 1, 2016 11:28
Linux - RHEL Conf Tips

Linux - RHEL Conf Tips

Disable firewalld with systemctl

  • Check if service is running:

    systemctl status firewalld 
    
@mbodo
mbodo / after
Created April 5, 2017 11:07 — forked from myst3k/after
enable on boot nodemanager and adminserver weblogic 12c
#enable each service for boot
systemctl enable nodemanager
systemctl enable adminserver
#then reboot and test
@mbodo
mbodo / Linux - Static ip network configuration with default gateway.md
Last active May 15, 2017 08:30
Configuration of static ip with default gateway

Linux - Static ip network configuration with default gateway

RHEL 7 (windows/vmware player/systemd):

1. Log as root, or user which can work with systemctl and edit /etc configuration.

2. Check if NetworkManager.service is running

systemctl status NetworkManager.service
@mbodo
mbodo / curl.md
Created May 13, 2018 19:27 — forked from subfuzion/curl.md
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.

@mbodo
mbodo / tmux.md
Created April 20, 2018 08:44 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@mbodo
mbodo / README-setup-socket-activated-systemd-service.md
Created September 15, 2018 14:16 — forked from drmalex07/README-setup-socket-activated-systemd-service.md
An example inetd-like socket-activated service. #systemd #inetd #systemd.socket

README

This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.

Define a socket unit

The key point here is to specify Accept=yes, which will make the socket accept connections (behaving like inetd) and pass only the resulting connection socket to the service handler.