Skip to content

Instantly share code, notes, and snippets.

@hoangitk
hoangitk / How to download file without browser.md
Last active October 19, 2021 13:57
[How to download file without browser] #tips

How to download file without browser

bitsadmin /transfer myDownloadJob /download /priority normal https://downloadsrv/10mb.zip c:\\10mb.zip
  • Powershell
@hoangitk
hoangitk / SSH Command.md
Last active October 15, 2021 08:48
[SSH Command] #ssh

SSH Command

  • Connect to server
> ssh <user>@<server>
  • Send remote command
> ssh <user>@<server> <command>
@hoangitk
hoangitk / Favorites Folder.md
Last active July 28, 2022 02:47
[Favorites Folder] #refs #windows
@hoangitk
hoangitk / auto_backup_all_db.sql
Created August 4, 2021 09:15
[Auto backup all DB] #backup #mssql
/*
credit: https://www.mssqltips.com/sqlservertip/1070/simple-script-to-backup-all-sql-server-databases
*/
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
DECLARE @fileDate VARCHAR(20) -- used for file name
-- specify database backup directory
@hoangitk
hoangitk / Fresh Installation.md
Created July 28, 2021 12:41
[Fresh Installation] #install #fresh #windows #cmd

Fresh Installation

Prompt

  • Command Line
> setx PROMT $P$_$G
@hoangitk
hoangitk / Icons by Unicode.md
Created July 28, 2021 03:37
[Icons by Unicode] #icons #tips

Icons by Unicode

  • Refresh
    ⭯ ⭮ ↺ ↻ ⟲ ⟳ 🔃🔄
    
@hoangitk
hoangitk / Powershell Prompt.md
Created July 27, 2021 04:20
[Powershell Prompt] #powershell #fresh-install

#Powershell Prompt

New-Item -ItemType File -Path $PROFILE -Force
notepad $PROFILE
function global:prompt {
@hoangitk
hoangitk / getIframeWindow.js
Created July 25, 2021 07:02
[Get Iframe Window] #javascript
function getIframeWindow(iframe_object) {
var doc;
if (iframe_object.contentWindow) {
return iframe_object.contentWindow;
}
if (iframe_object.window) {
return iframe_object.window;
}