Skip to content

Instantly share code, notes, and snippets.

@zinderud
zinderud / s
Created August 20, 2019 19:57
Windows hizmetinde konak ASP.NET Core
https://github.com/aspnet/AspNetCore.Docs/tree/master/aspnetcore/host-and-deploy/windows-service/samples/3.x/AspNetCoreService
@zinderud
zinderud / muzik
Created July 5, 2019 12:04
muzik
https://www.youtube.com/watch?v=MJucB1sf4mE
@zinderud
zinderud / gist:9bea3b5697699191717a777d3e8a3b64
Last active August 19, 2019 11:04
why-is-gitignore-not-ignoring-my-files
git rm -r --cached .
git add .
Then commit your changes:
git commit -m "Untrack files in .gitignore"
@zinderud
zinderud / .bashrc
Created June 24, 2019 07:03
console daki uzun path yolu kısaltma
# path yolu kısaltma
split_pwd() {
# Only show ellipses for directory trees -gt 3
# Otherwise use the default pwd as the current \w replacement
if [ $(pwd | grep -o '/' | wc -l) -gt 3 ]; then
pwd | cut -d'/' -f1-3 | xargs -I{} echo {}"/../${PWD##*/}"
else
pwd
fi
}
@zinderud
zinderud / docker mssql
Last active November 6, 2019 06:44
docker sql server
sudo docker pull mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
docker run \
-e 'ACCEPT_EULA=Y' \
-e 'MSSQL_SA_PASSWORD=YourSTRONG!Passw0rd' \
-p 1401:1433 \
-n sql1 \
-d mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
then,
dotnet dev-certs https -ep /tmp/dnc.pfx -p SomePassword
openssl pkcs12 -in /tmp/dnc.pfx -clcerts -nokeys -out /tmp/dnc.crt
cp -i /tmp/dnc.crt /usr/local/share/ca-certificates
cp -i /tmp/dnc.crt /usr/local/share/ca-certificates
update-ca-certificates
@zinderud
zinderud / 1
Last active June 11, 2019 06:25
package.json update
Looks like npm-check-updates is the only way to make this happen now.
npm i -g npm-check-updates
ncu -u
npm install
@zinderud
zinderud / lazyLoadScriptService.ts
Created April 4, 2019 12:23
Lazy Load Script Service
import { Injectable, Inject } from '@angular/core';
import { ReplaySubject, Observable } from 'rxjs';
import { DOCUMENT } from '@angular/common';
@Injectable({
providedIn: 'root',
})
export class LazyLoadScriptService {
_loadedLibraries: { [url: string]: ReplaySubject<any> } = {};
https://1drv.ms/x/s!AvMsQnIZbn9YhxpyoDT-BGU6DoRz
dockerdan calıştırma
docker exec it mongo:3.6 bash