http://idangero.us/swiper/demos/#.WSvXhuuGNkg
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
# copy object | |
var object2 = angular.copy(object1); | |
$interval | |
$timeout |
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
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, [email protected] / [email protected] |
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 os | |
myhost = os.uname()[1] | |
def app(environ, start_response): | |
start_response('200 OK', [('Content-Type', 'text/html')]) | |
#return [b'Hello, world!'] | |
return myhost | |
if __name__ == '__main__': |
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 json | |
import uuid | |
from wsgiref import simple_server | |
import falcon | |
import random | |
class StorageEngine(object): |
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
def add_servers(self, servers): | |
if not servers: | |
return | |
self._add_servers_config(servers) | |
self._restart_service() | |
def _add_servers_config(self, servers): | |
cfg_parser = Parser(cf_path) | |
configuration = cfg_parser.build_configuration() |
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
# Source https://github.com/rduplain/flask-svg-example/blob/master/app.py | |
import os | |
from flask import Flask, make_response, render_template, request | |
app = Flask(__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
<div ng-app="app" ng-controller="Main as main" class="container"> | |
<h1>Simple Angular Auth - Thinkster</h1> | |
<input type="text" class="form-control" ng-model="main.username" placeholder="username"><br> | |
<input type="password" class="form-control" ng-model="main.password" placeholder="password"><br> | |
<br> | |
<button class="btn" ng-click="main.register()">Register</button> | |
<button class="btn" ng-click="main.login()">Login</button> | |
<button class="btn" ng-click="main.logout()" ng-show="main.isAuthed()">Logout</button> |
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 json | |
import uuid | |
from wsgiref import simple_server | |
import falcon | |
import random | |
import os | |
myhost = os.uname()[1] |