sudo apt-get update
sudo ntpdate pool.ntp.org
sudo apt-get install ntp
This file contains 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
#!/bin/bash | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
path("in") { | |
extractUri { uri => | |
val st:Future[String] = getDefaultStrategy("abc").map(st=>st.name).recover{case f => "invalid" } | |
val urlTo = s match { | |
case "case1" => UriBuilder.build("abc").withPath(Uri.Path("/test/continue")).withQuery(Uri.Query(uri.rawQueryString)) | |
case "case2" => UriBuilder.build("abc").withPath(Uri.Path("/test/login")).withQuery(Uri.Query(uri.rawQueryString)) | |
case _ => UriBuilder.build("abc").withPath(Uri.Path("/test/login")).withQuery(Uri.Query(uri.rawQueryString)) | |
} | |
// After the future resolve we want to redirect using redirect(urlTo, StatusCodes.SeeOther) |
This file contains 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 class="card-deck-wrapper"> | |
<div class="card-deck"> | |
{{#each-in releaseVersions as |key value|}} | |
<div class="col-md-4 col-sm-6"> | |
<div class="card" style="margin-top:10px"> | |
<div class="card-header"> | |
{{key}} | |
</div> | |
<div class="card-block"> | |
{{#each value as |version|}} |
This file contains 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
''' | |
# Sample api endpoint | |
@app.route('/api/v1/test') | |
def testapi(): | |
oid = oid_from_now(5) | |
col = 'unit_test' | |
result = [] | |
import re | |
REGEX = re.compile('HDF-3.2.0.0*') | |
query = {"$and": [{"_id": {"$gt": bson.ObjectId(oid)}}, |
This file contains 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 get_task_json_data(data,length=256): | |
try: | |
json_data = None | |
if data and len(data)>length: | |
return error(400, 'value is > expected characters i.e. %s' % length) | |
elif data and not isinstance(data,dict): | |
return error(400, 'value is not a dictonary/json: %s' % data) | |
elif data and isinstance(data,dict): | |
json_data = json.dumps(data) | |
status = 0 |
This file contains 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
// Sample handelbar code <h5> Current System Date- {{utctime}} (UTC)</h5> | |
import Ember from 'ember'; | |
import config from './../config/environment'; | |
export default Ember.Route.extend({ | |
query: 'from_unixtime(start_time)>=curdate() and from_unixtime(start_time)<=DATE_ADD(curdate(),INTERVAL+1 day)', | |
model() { | |
var store = this.store; | |
return Ember.RSVP.hash({ |
This file contains 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
NewerOlder