Skip to content

Instantly share code, notes, and snippets.

View noizwaves's full-sized avatar

Adam Neumann noizwaves

View GitHub Profile
@guillaumepiot
guillaumepiot / gist:3939452
Created October 23, 2012 15:28
ANGULARJS - Django CSRF Token header setup
var myApp = angular.module('myApp').config(function($httpProvider) {
$httpProvider.defaults.headers.post['X-CSRFToken'] = $('input[name=csrfmiddlewaretoken]').val();
});
@imlucas
imlucas / add_users.py
Created April 12, 2012 12:58
Using Amazon Cloudsearch with Python and Boto
from cloudsearch import connect_cloudsearch, get_document_service
endpoint = 'paste your doc service endpoint here'
service = get_document_service(endpoint=endpoint) # Get a new instance of cloudsearch.DocumentServiceConnection
# Presumably get some users from your db of choice.
users = [
{
'id': 1,
@epicserve
epicserve / ubuntu-server-django-guide.rst
Last active June 9, 2023 00:38
Ubuntu Server Setup Guide for Django Websites
@frsyuki
frsyuki / build.sh
Created October 31, 2011 06:45
Build libhadoop.dylib on Mac OS X Lion
patch -p0 <<EOF
diff -ru a/src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c b/src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c
--- src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c 2011-07-19 04:12:32.000000000 +0900
+++ src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c 2011-10-31 15:27:23.000000000 +0900
@@ -73,7 +73,8 @@
// was successfull or not (as long as it was called we need to call
// endnetgrent)
setnetgrentCalledFlag = 1;
- if(setnetgrent(cgroup) == 1) {
+ setnetgrent(cgroup);