Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am natehefner on github.
  • I am natehefner (https://keybase.io/natehefner) on keybase.
  • I have a public key whose fingerprint is 4716 22E3 9BDF 89E1 ECD5 DAF7 49EE 6BC0 903A 9642

To claim this, I am signing this object:

@natehefner
natehefner / urls.py
Created September 30, 2014 01:30
Django Update View Without Slug
from django.conf.urls import patterns, include, url
from .views import UserUpdate
urlpatterns = patterns(
'',
url(r'^settings/$', UserUpdate.as_view(), name='accounts_settings'),
)
@natehefner
natehefner / functions.php
Last active August 29, 2015 14:06
WordPress Theme Security
function remove_header_info() {
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'index_rel_link' );
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
}
@natehefner
natehefner / jsonrestapi.py
Last active December 17, 2015 02:39
Basic JSON REST API using the Flask web microframework.
import os
import Flask, jsonify
@app.route('/')
def index():
json = jsonify(response="Hello World!")
return json
if __name__ == '__main__':
app.debug = True