Skip to content

Instantly share code, notes, and snippets.

View aleor's full-sized avatar

Rustem aleor

View GitHub Profile
@aleor
aleor / git remote change
Created April 29, 2018 12:26
Change git remote
check current: git remote -v
cd <root directory of your local repository>
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
got remote -v
git fetch/push
@aleor
aleor / Docker memo notes
Last active April 20, 2018 16:32
Docker memo note
Build image:
docker build -t myimage/name .
List images:
docker image ls
Run image with publishing ports on host:
docker run --rm -it -p 8080:80 myimage/name
Look inside the container:
@aleor
aleor / Custom validation attribute
Created February 26, 2018 15:39
asp net mvc custom validation attribute (checks if age is in allowed range based on date of birth)
using System;
using System.ComponentModel.DataAnnotations;
namespace SampleProject.Validators
{
public class AgeRangeAttribute : ValidationAttribute
{
private readonly int _minAge;
private readonly int _maxAge;
@aleor
aleor / gist:9556a266ff7022b9db3220f254c4419a
Created May 6, 2017 14:31
Hide .js and .map files in VS Code if there are corresponding .ts files
{
"files.exclude": {
"**/*.js": { "when": "$(basename).ts" },
"**/*.map": { "when": "$(basename).map" }
}
}
@aleor
aleor / settings
Created April 25, 2017 08:40
VSCode custom settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 18,
"files.autoSave": "off",
"files.autoSaveDelay":60000,
"editor.mouseWheelZoom": true,
"html.suggest.ionic": false,
"php.suggest.basic": false,
"php.validate.enable": false
}