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
/* | |
* This app depends on jquery and a remote script called "remote.js" (serve over localhost :p) | |
* Locally I will have main.js and require.js. | |
* main.js contain an entry function "init" and it depends on jquery | |
* and remote.js to be fully loaded. | |
*/ | |
require.config({ | |
paths: { | |
"jquery": "https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min", | |
"remote": "http://localhost:8000/scripts/remote" |
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
app.controller('HomeController', function($scope, $timeout, $http, $location) { | |
/* | |
In order to kill a timeout, we must save the promise ($timeout | |
returns a promise). We first get all the groups via calling | |
/api/profile to build a <select>. | |
We immediately trigger $scope.getAsGroup() to load data to get all | |
the sites the user is a member of. This function invokes like this | |
state machine: |
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
$scope.get = function() { | |
var api_url = "/api/users" | |
$http.get(api_url).success(function(response, status, headers, config){ | |
$scope.users = response.data; | |
}); | |
}; | |
<table class="table"> | |
<thead> |
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
app.controller("HomeController", function($scope, $http, $location, $timeout) { | |
$scope.promise = 0; | |
$scope.groups = [] | |
$scope.group_name = "" | |
$http.get("/api/profile").success(function(response, status, headers, config) { | |
if (response.success) { | |
for (index in response.data["groups"]) | |
$scope.groups.push({"name": response.data["groups"][index]}) | |
} |
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
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
import ast | |
import logging | |
import os | |
import re | |
import subprocess |
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
from zapv2 import ZAPv2 as zap | |
import time | |
target = "http://testfire.net" | |
z = zap(proxies={'http': 'http://127.0.0.1:8080'}) | |
z.urlopen(target) | |
time.sleep(5) | |
print 'start..' | |
def progress(obj): | |
while 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
usename and password | |
vagrant | |
vagrant | |
ifconfig probably will give you 192.168.33.50 | |
mongo | |
use minion |
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
terminal 1 | |
benv && super restart all && super stop minion-backend && minion-backend-api runserver -d | |
terminal 2 (after teriminal 1 finishes the command) | |
fenv && super stop minion-frontend-server && minion-frontend -a 0.0.0.0 -d |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
print "hit base url" | |
return """\ | |
<html><body><a href="http://localhost:1234/path1">path1</a><a href="http://localhost:1234/path2">path2</a></body></html>""" |
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
- name: xxxxx | |
template: src=${item.src} dest=${item.dest} | |
file: path=${item.dest} owner=you group=you mode=0777 | |
with_items: | |
- oh yeah baby |