Skip to content

Instantly share code, notes, and snippets.

View cheshirrrcat's full-sized avatar
👻
Dealing with ghosts

Mikhail Gladchenko cheshirrrcat

👻
Dealing with ghosts
  • Justice League
  • Portugal, Lisbon
View GitHub Profile
@cheshirrrcat
cheshirrrcat / remove-from-git-index
Created December 22, 2014 13:51
Удалить файл из индекса git-репозитория без его физического удаления
Для удаления файла из git-репозитория без его физического удаления:
git rm --cached mylogfile.log
Для удаления папки (рекурсивно) можно сделать так:
git rm -r --cached folderName
А для того, чтобы ситуация не повторялась, лучше добавьте файл или папку в .gitignore.
@chrisjhoughton
chrisjhoughton / wait-global.js
Created December 10, 2013 13:02
Wait for a global variable to exist on the page.
var waitForGlobal = function(key, callback) {
if (window[key]) {
callback();
} else {
setTimeout(function() {
waitForGlobal(key, callback);
}, 100);
}
};