This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
cat <<EOF > ~/.inputrc | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
EOF |
This file contains 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
if [ "$UID" != "0" ]; then | |
echo "$UID" | |
echo "Please run as root or via sudo" | |
exit | |
else | |
echo "$UID" | |
echo "OK." | |
fi |
This file contains 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
disable Hyper-V without deinstalling it | |
You can disable Hyper-V without deinstalling it. Start a command prompt with administrator rights and execute the following command: | |
CODE: SELECT ALL EXPAND VIEW | |
bcdedit /set hypervisorlaunchtype off | |
Reboot windows. Hyper-V is disabled now. If you want to enable it, then run this command: | |
CODE: SELECT ALL EXPAND VIEW |
This file contains 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
:: save this file as "sudo.cmd" and place it in your %PATH% | |
@echo Set objShell = CreateObject("Shell.Application") > %temp%\sudo.tmp.vbs | |
@echo args = Right("%*", (Len("%*") - Len("%1"))) >> %temp%\sudo.tmp.vbs | |
@echo objShell.ShellExecute "%1", args, "", "runas" >> %temp%\sudo.tmp.vbs | |
@cscript %temp%\sudo.tmp.vbs |
This file contains 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
Если "пропал" значок Internet Explorer в Windows 8/8.1 | |
1. Go to the Start screen. | |
2. Type cmd. | |
3. Click the cmd.exe icon on the left side of the screen to open a Command Prompt window. | |
Important Do not select the option to run the program as an administrator. | |
4. At the command prompt, enter the following command: | |
C:\Windows\System32\ie4uinit.exe -UserIconConfig |
This file contains 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
как посмотреть информацию о железе из CMD.exe (PsExec) | |
# модель процессора | |
wmic cpu get name,CurrentClockSpeed,MaxClockSpeed | |
# версия BIOS | |
wmic bios get name,serialnumber,version |
This file contains 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
@echo off | |
:: for /f "delims== tokens=2" %%a in ( | |
:: 'wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value' | |
:: ) do ( | |
:: set /a degrees_celsius=%%a / 10 - 273 | |
:: ) | |
:: | |
:: echo %degrees_celsius% |
This file contains 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
Before running the PSConfig , we have to configure the SQL Client Alias. There will be two versions of cliconfig in 64 bit operating system. | |
C:\Windows\System32\cliconfg.exe - 64 bit version of cliconfig.exe | |
C:\Windows\SysWOW64\cliconfig.exe – 32 bit version of cliconfig.exe | |
SharePoint 2010 & 2013 are 64 based so we have to configure the 64 bit version of cliconfig. | |
C:\Windows\System32\cliconfg.exe |
This file contains 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
#!/bin/bash | |
# | |
# https://m.reddit.com/r/sysadmin/comments/1b1ezy/hostnamenetwork_config_script_for_kickstart/ | |
# | |
HWADDR=`ifconfig eth0 | grep HW | awk ' BEGIN { FS = " " } ; { print $5 } ; '` | |
hostn="" | |
mode="" | |
hostfile="/etc/sysconfig/network" |
OlderNewer