Skip to content

Instantly share code, notes, and snippets.

View sarvar's full-sized avatar

Sarvar sarvar

  • Uzbekistan, Tashkent
View GitHub Profile
@sarvar
sarvar / header.html
Created April 17, 2019 11:11
Make header and footer files to be included in multiple html pages
<html>
<head>
<title></title>
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
</script>
<script>
$(function(){
@sarvar
sarvar / style.css
Created March 11, 2019 09:59
How to vertically align div on page with flexbox
.container{
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
@sarvar
sarvar / remove.txt
Created January 18, 2019 13:35
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@sarvar
sarvar / gulp.txt
Created January 16, 2019 18:31
Updating to Gulp 4
# first uninstall gulp globally
npm uninstall gulp -g
# uninstall from your project directory, or delete node_modules if you need a coffee break
npm uninstall gulp
# install the latest Gulp 4 CLI tools globally
npm install gulpjs/gulp-cli -g
@sarvar
sarvar / index.html
Created January 6, 2019 17:34
Vertical and Horizontal align center
<div class="full-height">
<div class="vertical-center">
<div class="row justify-content-center">
<div class="col-md-4 col-sm-6 col-12">
<h1>Some Text</h1>
</div>
</div>
</div>
</div>
@sarvar
sarvar / gulp.txt
Created December 28, 2018 06:28
Installing gulp 4 globally
npm rm -g gulp
npm install -g gulp-cli
@sarvar
sarvar / npm.txt
Created December 24, 2018 10:50
npm rebuild node sass
npm rebuild node-sass
@sarvar
sarvar / git.txt
Created December 13, 2018 07:18
Git refusing to merge unrelated histories on rebase
git pull origin master --allow-unrelated-histories
git merge origin origin/master
... add and commit here...
git push origin master
@sarvar
sarvar / proxy.txt
Created December 13, 2018 06:04
Git under proxy
git config --global http.proxy http://proxy.mycompany:80
@sarvar
sarvar / info.txt
Created December 7, 2018 18:17
Import an existing git project into GitLab
git init
git remote add origin +"githublink"
git add .
git commit -m "Initial Commit"
git pull origin master
git push origin master
git push -u gitlab --all
git push -u gitlab --tags