Skip to content

Instantly share code, notes, and snippets.

View barlas's full-sized avatar

Barlas Apaydin barlas

View GitHub Profile
@ramesaliyev
ramesaliyev / Git Cheat Sheet
Last active October 23, 2019 12:18
Git Cheat Sheet
- Create a repository
git init <repo-name>
git clone <url> <directory-name>
git clone -o <remote-name> <url>
- Commiting
git add <filename>
git commit -m "Commit Message"
git commit -am "Commit Message"
git commit --amend --date="now"
@offsky
offsky / NewMacConfig.md
Last active July 3, 2017 15:50
Setup new mac for web development (Updated for Yosemite)
@sstephenson
sstephenson / back_forward.js
Created December 13, 2010 21:55
How to detect whether a hash change came from the Back or Forward button
var detectBackOrForward = function(onBack, onForward) {
hashHistory = [window.location.hash];
historyLength = window.history.length;
return function() {
var hash = window.location.hash, length = window.history.length;
if (hashHistory.length && historyLength == length) {
if (hashHistory[hashHistory.length - 2] == hash) {
hashHistory = hashHistory.slice(0, -1);
onBack();