Skip to content

Instantly share code, notes, and snippets.

body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
import * as ion from 'ionicons/icons';
import {NbIcons} from "@nebular/theme/components/icon/icon-pack";
function map(icon: string) {
return icon.replace('data:image/svg+xml;utf8,', '');
}
export const NbIonIcons: NbIcons = {
'add': map(ion.add),
'add-circle': map(ion.addCircle),
{
"name": "load-google-maps",
"version": "1.0.0",
"authors": ["Glenn Baker", "Gavin Foley", "Matteo Gaggiano"],
"description": "Load Google Maps API using jQuery Deferred.",
"main": "load-google-maps.js",
"keywords": ["Google Maps", "Async"],
"license": ["MIT", "GPL"],
"dependencies": {
"jquery": ">=1.5"
@marchrius
marchrius / Example.java
Last active July 28, 2020 09:55
Maps builder utility
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.marchirus.utils.Maps;
public class Example { public static void main(String[] args) {
Maps.Builder<String, String> builder = Maps.builder();
builder.pair("Key1", "Value1")
.key("Key2").value("Value2")
@marchrius
marchrius / keybase.md
Created December 9, 2020 09:03
Keybase proof

Keybase proof

I hereby claim:

  • I am marchrius on github.
  • I am marchrius (https://keybase.io/marchrius) on keybase.
  • I have a public key whose fingerprint is 4D58 6729 4E67 8AC7 B0C5 CA9C BC90 5688 7987 1E01

To claim this, I am signing this object:

#!/usr/bin/env bash
DATABASE_URL="postgres://MyPostgresUser:MyPostgresPassword@192.168.0.1:5432/MyPostgresDB"
# `cut` is used to cut out the separators (:, @, /) that come matched with the groups.
DATABASE_USER=$(echo $DATABASE_URL | grep -oP "postgres://\K(.+?):" | cut -d: -f1)
DATABASE_PASSWORD=$(echo $DATABASE_URL | grep -oP "postgres://.*:\K(.+?)@" | cut -d@ -f1)
DATABASE_HOST=$(echo $DATABASE_URL | grep -oP "postgres://.*@\K(.+?):" | cut -d: -f1)
DATABASE_PORT=$(echo $DATABASE_URL | grep -oP "postgres://.*@.*:\K(\d+)/" | cut -d/ -f1)
const fs = require('fs');
/**
* This script transfers bash history to zsh history
* Change bash and zsh history files, if you don't use defaults
*
* Usage: node bash_to_zsh_history.js
*
* Author: Matteo Gaggiano
*/