This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************** | |
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using jQuery | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? | |
if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = sorted(list(), key=lambda x: x['key'], reverse=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_function(id) { | |
var system = getajaxdata(name); | |
system.done(function(data){ | |
var information = data.info; | |
// do stuff with `information` here, not elsewhere. | |
}); | |
} | |
function getajaxdata(name){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin indent on | |
set encoding=utf8 | |
set paste | |
set expandtab | |
set textwidth=0 | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
set backspace=indent,eol,start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esc - modo de navegação | |
i - insert | |
I - Insere no começo da linha | |
a - um caracter a frente | |
A - Insere no final da linha | |
o - insere na próxima linha (linha de baixo) | |
O - insere na linha de cima |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check that the wireless device is up | |
ip link show wlan0 | |
# wlan0 UP | |
ip link set wlan0 up | |
ip link show wlan0 | |
# Check the connection status | |
iw wlan0 link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from collections import namedtuple | |
DIGRAM_TABLE = [ | |
['E', 'S', 'P', 'I', 'A'], | |
['O', 'B', 'C', 'D', 'F'], | |
['G', 'H', 'K', 'L', 'M'], | |
['N', 'Q', 'R', 'T', 'U'], | |
['V', 'W', 'X', 'Y', 'Z'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ctrl + a – go to the start of the command line | |
Ctrl + e – go to the end of the command line | |
Ctrl + k – delete from cursor to the end of the command line | |
Ctrl + u – delete from cursor to the start of the command line | |
Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word) | |
Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor | |
Ctrl + xx – move between start of command line and current cursor position (and back again) | |
Alt + b – move backward one word (or go to start of word the cursor is currently on) | |
Alt + f – move forward one word (or go to end of word the cursor is currently on) | |
Alt + d – delete to end of word starting at cursor (whole word if cursor is at the beginning of word) |
OlderNewer