This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Windows Only - Change JAVA PATH - http://stackoverflow.com/questions/26864662/how-to-solve-the-error-the-system-cannot-find-the-file-c-programdata-oracle-ja] | |
cd C:\ProgramData\Oracle\Java\javapath | |
del java*.exe | |
mklink java.exe "C:\Program Files\Java\jdk1.8.0_91\bin\java.exe" | |
mklink javaw.exe "C:\Program Files\Java\jdk1.8.0_91\bin\javaw.exe" | |
mklink javaws.exe "C:\Program Files\Java\jdk1.8.0_91\bin\javaws.exe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT OBJECT_SCHEMA_NAME(T.[object_id],DB_ID()) AS [Schema], | |
T.[name] AS [table_name], AC.[name] AS [column_name], | |
TY.[name] AS system_data_type, AC.[max_length], | |
AC.[precision], AC.[scale], AC.[is_nullable], AC.[is_ansi_padded] | |
FROM sys.[tables] AS T | |
INNER JOIN sys.[all_columns] AC ON T.[object_id] = AC.[object_id] | |
INNER JOIN sys.[types] TY ON AC.[system_type_id] = TY.[system_type_id] AND AC.[user_type_id] = TY.[user_type_id] | |
WHERE T.[is_ms_shipped] = 0 | |
ORDER BY T.[name], AC.[column_id] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Query user name | |
*/ | |
DECLARE @name SYSNAME = N' input your query account '; | |
/* | |
* For Server Roles | |
*/ | |
;with ServerPermsAndRoles as | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nslookup -type=srv _ldap._tcp.{your_domain_name} | |
e.g. | |
nslookup -type=srv _ldap._tcp.tw.server.org | |
nslookup -type=srv _ldap._tcp.us.server.org | |
nslookup -type=srv _ldap._tcp.cn.server.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ServerManager | |
Add-WindowsFeature RSAT-AD-PowerShell | |
Get-ADUser "user_name" -Properties * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ServerManager | |
Add-WindowsFeature RSAT-AD-PowerShell | |
$DLName = "DL_Name" | |
$ADServer = "AD_Server_Name" | |
$ResultList = @() | |
$Groups = Get-ADGroup -Properties * -Filter{name -like $DLName} -Server $ADServer |Select Name, ManagedBy| | |
Foreach-Object{ | |
$Group = $_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ for ((i=1;i<=1000;i++)); do curl "https://test.com/test.html" && sleep 3; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The script only effect on https://histock.tw/stock/dividend.aspx | |
add warrant link below the financial link. | |
*/ | |
for (r = 0; r < document.getElementsByClassName('tb-msci').length; r++) { | |
var table = document.getElementsByClassName('tb-msci')[r]; | |
for (i = 0; i < table.rows.length; i++) { | |
if (table.rows[i].cells[2]) { | |
//before https://histock.tw/stock/financial.aspx?no=0056&t=2 | |
//after https://histock.tw/stock/warrant.aspx?no=0056 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- select dbo.fn_UnderscoreCase('HelloWorld') | |
-- | |
-- Input HelloWorld | |
-- | |
-- Output hello_world | |
-- | |
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'fn' AND name = | |
'fn_UnderscoreCase') | |
DROP function fn_UnderscoreCase | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$table = get-childitem -recurse | where {! $_.PSIsContainer} | |
foreach ($row in $table) | |
{ | |
Get-FIleHash $row.FullName -Algorithm SHA1 | |
} | |
pause |