Skip to content

Instantly share code, notes, and snippets.

:octocat:
/人◕ ‿‿ ◕人\

Kelp kelp404

:octocat:
/人◕ ‿‿ ◕人\
Block or report user

Report or block kelp404

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kelp404
kelp404 / gist:e5f1079c3910fd4f2238
Created Jul 16, 2014
GlobalMiddleware in Python django
View gist:e5f1079c3910fd4f2238
import threading
g = threading.local()
class GlobalMiddleware(object):
"""
Global variable.
"""
def process_request(self, request):
View -.js
Array.prototype.remByVal = function(val) {
for (var i = 0; i < this.length; i++) {
if (this[i] === val) {
this.splice(i, 1);
i--;
}
}
return this;
};
//Call like
@kelp404
kelp404 / _remove_all_text_search_documents.md
Last active Dec 12, 2015
Remove all documents in text search (GAE)
View _remove_all_text_search_documents.md

##Remove all documents in text search (GAE) ###Python

View git_note.md

#Git note

Tags

git tag -a <tag name> -m <comment>
git tag -d <tag name>

Push tags to remote

@kelp404
kelp404 / processingTime.m
Last active Dec 11, 2015
Logging code processing time
View processingTime.m

##Logging code processing time ###Objective-C

@kelp404
kelp404 / _uuidString.md
Last active Dec 11, 2015
Generat UUID String
View _uuidString.md

##Generat UUID String ###Objective-C

@kelp404
kelp404 / gist:4572967
Last active Dec 11, 2015
Google App Engine note
View gist:4572967

#Google App Engine note

Update

appcfg.py update myapp/

Update backends

appcfg.py backends myapp/ update
@kelp404
kelp404 / _backButtonInNavigation.md
Last active Oct 13, 2015
Change the text of the back button in navigationbar
View _backButtonInNavigation.md

##Back button'text in navigationbar ###Objective-C

View _urlEncode.md

##Url Encode ###Objective-C

You can’t perform that action at this time.