Skip to content

Instantly share code, notes, and snippets.

open -na /Applications/Skype.app --args -DataPath "/Users/$(whoami)/Library/Application Support/Skype ANODA"
@Vipous
Vipous / create-docker-tls.sh
Created May 18, 2016 13:17 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@Vipous
Vipous / LIMIT_JDBC_LOGON_TRIGGER.sql
Created March 22, 2016 12:27
[ORACLE] LIMIT JDBC LOGON TRIGGER
CREATE OR REPLACE TRIGGER LIMIT_JDBC_LOGON_TRIGGER
AFTER LOGON ON DATABASE
DECLARE
n_count number;
BEGIN
DBMS_SESSION.SET_IDENTIFIER(SYS_CONTEXT('USERENV', 'MODULE')||':'||SYS_CONTEXT('USERENV', 'OS_USER')||':'||user);
if SYS_CONTEXT('USERENV', 'MODULE') like 'JDBC%' then
select count(*) into n_count
from v$session t
where t.MODULE like 'JDBC%'
@Vipous
Vipous / kill_inactive.sql
Created March 22, 2016 12:26
[ORACLE] Kill inactiv session
DECLARE
CURSOR SESSIONS IS
SELECT s.status "Status",
si.SID AS SIDS,
SYSDATE - (s.last_call_et / 86400) "Last Call",
s.serial# AS SERIAL,
s.TYPE "Type",
s.username "DB User",
s.osuser "Client User",
s.server "Server",
@Vipous
Vipous / fk_index.sql
Created March 22, 2016 12:23
[ORACLE] Create Index on Foreign Key
set serveroutput on;
set timing on;
begin
for rec in (select 'create index ' || substr(table_name, 1, 22) || '_FKIDX' || num || ' on ' || table_name || ' (' || columns || ')' cmd
from (select table_name,
constraint_name,
cname1 || nvl2(cname2, ',' || cname2, null) || nvl2(cname3, ',' || cname3, null) ||
nvl2(cname4, ',' || cname4, null) || nvl2(cname5, ',' || cname5, null) || nvl2(cname6, ',' || cname6, null) ||
nvl2(cname7, ',' || cname7, null) || nvl2(cname8, ',' || cname8, null) columns,
row_number() over(PARTITION by table_name order by constraint_name) num
import static java.time.Month.*;
import java.time.LocalDate;
import java.time.MonthDay;
import java.time.format.DateTimeFormatter;
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ObjectProperty;
@Vipous
Vipous / ExtHashMap.java
Last active August 29, 2015 14:17
MapDB second commit broke data
import java.util.HashMap;
public class ExtHashMap extends HashMap<String,String>{}