I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
# -*- coding: utf-8 -*- | |
''' | |
Returns state event data for state.sls and state.highstate execution only using a tcp socket, this method of | |
returning data can be used for Splunk or ELK. | |
Each event sent represents a single state executed. | |
It is strongly recommended to use the ``event_return_whitelist`` so not all | |
events call this returner, for example: |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
# Load Json into a Python object | |
import urllib2 | |
import json | |
req = urllib2.Request("http://localhost:81/sensors/temperature.json") | |
opener = urllib2.build_opener() | |
f = opener.open(req) | |
json = json.loads(f.read()) | |
print json | |
print json['unit'] |
https://github.com/atom/atom/releases/download/v1.6.0/atom-windows.zip | |
https://notepad-plus-plus.org/repository/6.x/6.9/npp.6.9.Installer.exe |
def new_user(username, admin='no', comment="No comment provided"): | |
log_action("New User (%s): %s" % (username, comment)) | |
pass | |
$ fab new_user:myusername | |
$ fab new_user:username=myusername | |
$ fab new_user:myusername,yes | |
$ fab new_user:myusername,admin=yes | |
$ fab new_user:myusername,admin=no,comment='Gary\, new developer (starts Monday)' |
rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-12.rhel6.noarch.rpm |
# These rules are designed to be effective versus /distributed/ brute force | |
# attacks. While they will function just as well against attacks which are | |
# /not distributed/ they will deny access to all XML-RPC method calls | |
# namespaced with the prefix "wp." | |
# | |
# An IP-based version of these rules may be more appropriate for sites which | |
# attacked from just a few distinct IP addresses. | |
# | |
# See http://alzabo.io/modsecurity/2014/09/15/wordpress-xml-rpc-brute-force.html | |
# for additional information |
var Q = require("q"); | |
var slowFunction1 = function( myObject ) { | |
console.log("\nRunning slowFunction1"); | |
console.log(myObject); | |
var deferred = Q.defer(); | |
setTimeout( function() { |