Skip to content

Instantly share code, notes, and snippets.

View n1lux's full-sized avatar
🎯
Focusing

Nilo Alexandre Pereira n1lux

🎯
Focusing
  • Grupo Boticário
  • Poços de Caldas - MG
  • 06:48 (UTC -12:00)
View GitHub Profile
@n1lux
n1lux / make_checkboxes.js
Last active January 13, 2016 19:07
checkboxes from json
/********************************************************************
Build checkboxes
params: obj= threat object,
list_all_input = all inputs received,
checkbox_id = checkbox id
type=type data
*********************************************************************/
function build_checkboxes(obj, list_all_input, array_checked_obj, checkbox_id, type_data){
/* Build control types checkboxes */
$(checkbox_id).empty();
@n1lux
n1lux / django-angular-initial-config.js
Last active January 20, 2016 00:04
angular config interpolate and csrf token
var app = angular.module('app',['ngCookies', 'ui.bootstrap'],
// Change interpolation symbols
function ($interpolateProvider) {
$interpolateProvider.startSymbol('{$');
$interpolateProvider.endSymbol('$}');
});
app.config(['$httpProvider', function($httpProvider) {
// Change content type for POST so Django gets correct request object
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';