##ubuntu firewall -> ufw allow port (https://wiki.ubuntuusers.de/ufw/#Firewall-Regeln)
ufw allow 8080
##use screen for ssh instances
screen
var sql = "USE <DBNAME>;" + | |
"create user [domain\\user] from login [domain\\user];" + | |
"ALTER ROLE db_datareader ADD MEMBER [domain\\user] ;"; | |
try | |
{ | |
using (var ctx = new MyContext()) | |
{ | |
Info($"Start Grant Acess to xx: {DateTime.Now}"); | |
ctx.Database.ExecuteSqlCommand(sql); |
DECLARE @SQL varchar(max) | |
SELECT @SQL = COALESCE(@SQL,'') + 'kill ' + Convert(varchar, SPId) + ';' | |
FROM MASTER..SysProcesses | |
WHERE DBId = DB_ID(<DBNAME>) AND SPId <> @@SPId | |
--SELECT @SQL | |
--EXEC(@SQL) |
1. Try to set npm registry using : npm config set registry https://registry.npmjs.org/ | |
2. Check result of curl https://registry.npmjs.org/ | |
3. Clear the cache: npm cache clean --force | |
4. Try to run npm install | |
via: https://stackoverflow.com/a/52134366/119109 |
<system.net> | |
<mailSettings> | |
<smtp deliveryMethod="network" from="[email protected]"> | |
<network host="hostIP" port="25" userName="username" password="password" enableSsl="false" /> | |
</smtp> | |
</mailSettings> | |
</system.net> |
# via https://gist.github.com/shanselman/9a5f73071e41b46dfcf9585ed5e14085?WT.mc_id=-blog-scottha | |
Import-Module BitsTransfer | |
$path = $env:USERPROFILE + "\Downloads\" | |
$feedContent = ([xml](new-object net.webclient).downloadstring("https://channel9.msdn.com/Series/CSharp-101/feed/mp4")) | |
$cnt = 20 | |
$feedContent.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $url.Segments[-1] | |
$cnt = $cnt - 1 |
$target = "chrome" | |
$process = Get-Process | Where-Object {$_.ProcessName -eq $target} | |
while ($true) | |
{ | |
while (!($process)) | |
{ | |
$process = Get-Process | Where-Object {$_.ProcessName -eq $target} | |
start-sleep -s 5 | |
} |
#################################################################################### | |
# get the list of own aliases | |
# save under C:\Windows\System32\WindowsPowerShell\v1.0 | |
function listMyAliases(){ | |
echo "###############################################################################################" | |
echo " outlook #start Outlook" | |
echo " g <searchterm> #lmgtfy :)" | |
echo " so #search at stackoverflow with optional tags (blank separated)" | |
echo " n #download and init nuget" | |
echo " gitignore #get and save the gitignore file from API" |
##ubuntu firewall -> ufw allow port (https://wiki.ubuntuusers.de/ufw/#Firewall-Regeln)
ufw allow 8080
##use screen for ssh instances
screen
$server = "%INT_Jobserver_Name%" | |
$username = "%INT_Jobserver_Username%" | |
$password = "%INT_Jobserver_Password%" | ConvertTo-SecureString -AsPlainText -Force | |
$creds = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password | |
$session = New-PSSession -ComputerName $server -Credential $creds | |
Enter-PSSession $session | |
Invoke-Command {Stop-Service "Softcrafts.Service.Name"} -Session $session |
/p:Configuration=%BuildConfiguration% //INT
/p:LastUsedBuildConfiguration=%BuildConfiguration% //INT
/p:PublishProfile=%DeployConfig% //Properties/PublishProfiles
/p:DeployIisAppPath=%WebDeployIisAppPath% //path to iis website
/p:UserName=%WebDeployUser%
/p:Password=%WebDeployPwd%
/p:AspnetMergePath=%AspnetMergePath% //"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"