Skip to content

Instantly share code, notes, and snippets.

code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
[PSCredential]::new(0, $SecurePassword).GetNetworkCredential().Password
$REGKEY="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
$REGITEM = "DoNotConnectToWindowsUpdateInternetLocations"
function Set-RegistryItem {
param (
# Registry key to set
[Parameter(Mandatory=$true)]
[string]
$RegistryKey,
@nexocentric
nexocentric / hiawatha.conf
Created June 6, 2017 03:40
Default /etc/hiawatha/hiawatha.conf on Ubuntu
# From http://secure-ubuntu-server.blogspot.co.id/2015/05/howto-highest-secured-hiawatha-web.html and default conf
# Hiawatha main configuration file
# VARIABLES
# With 'set', you can declare a variable. Make sure the name of the
# variable doesn't conflict with any of the configuration options. The
# variables are case-sensitive and cannot be redeclared.
#
#set LOCALHOST = 127.0.0.0/8
SELECT
Sum(l.cslbr_temp + l.cslbr_wkr) AS TTL,
Sum(l.cslbr_temp) AS Temp,
Sum(l.cslbr_wkr) AS Worker,
l.subprocess_id
FROM
vw_cslabor l,
vm_subprocess s
WHERE
s.SUBPROCESS_ID(+) = l.SUBPROCESS_ID
@nexocentric
nexocentric / gist:1f7087edf126a9315f375c4efba9829c
Created March 27, 2017 18:57
Working with procedures and functions in PL/SQL
DECLARE
x VARCHAR2(8);
BEGIN
x := item_change_mapping_io.iswarehouseitem('01217');
dbms_output.put_line(x);
END;
var rc refcursor;
exec item_change_mapping_io.GetPrimaryGridData(:rc);
print rc;
@nexocentric
nexocentric / gist:f2f6dcf7186c117d04d6
Created October 28, 2014 18:38
Oracle SQL: Natural Numeric Sort Order By Clause
--==========================================================
-- order by natural sort order as in
-- 1, 2.. 10, 11 and not computer sort order
--==========================================================
ORDER BY
to_number(regexp_substr(CHAR_COLUMN,'^[0-9]+')),
to_number(regexp_substr(CHAR_COLUMN,'[0-9]+$')),
CHAR_COLUMN
--------------------------------------------------------
-- list all known stored procedures in oracle
--------------------------------------------------------
SELECT
owner,
object_name
FROM
dba_objects
WHERE
object_type = 'PROCEDURE'
--------------------------------------------------------
-- get a list of arguments for specifed stored procedure
--------------------------------------------------------
SELECT
argument_name,
in_out,
data_type
FROM
all_arguments
WHERE
@nexocentric
nexocentric / gist:9636955
Created March 19, 2014 07:23
some javascripts for radio and select initalizations
//==========================================================
// [作成者]
// Dodzi Y. Dzakuma
// [概要]
// 選択されているグループステータスの初期値を設定する
// [引数]
// 1) 状況を表す整数
// [返り値]
// 無し
//==========================================================