Skip to content

Instantly share code, notes, and snippets.

View phlegx's full-sized avatar
💪
never stop coding

Phlegx Systems phlegx

💪
never stop coding
View GitHub Profile
url = URI.parse('cluster-cm.example.com/balancer-manager')
req = Net::HTTP::Post.new(url.path)
req.use_ssl = true
req.basic_auth '[email protected]', 'pass'
req.set_orm_data({'status_D' => '1'})
resp = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
puts resp
####
url = URI.parse('https://cm.example.com/balancer-manager')
req = Net::HTTP::Post.new(url.path)
req.basic_auth '[email protected]', 'pass'
req.set_form_data({'status_D' => '1'})
resp = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
puts resp
## Error: -------------------------------------------------------------------------
<table border="0" style="text-align: left;"><tr><th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th></tr>
<tr><td>JSESSIONID|jsessionid</td><td>0</td><td>1</td>
<td>byrequests</td>
</table>
<br />
<table border="0" style="text-align: left;"><tr><th>Worker URL</th><th>Route</th><th>RouteRedir</th><th>Factor</th><th>Set</th><th>Status</th><th>Elected</th><th>To</th><th>From</th></tr>
<tr>
<td><a href="/balancer-manager?b=cm-cluster&w=ajp://c1:8009&nonce=5f75d366-0383-43f0-a2df-9f92e62493e0">ajp://c1:8009</a></td><td>c1</td><td></td><td>1</td><td>0</td><td>Init Ok </td><td>0</td><td> 0 </td><td> 0 </td></tr>
<tr>
CONSTRUCT { ?s ?p ?o . <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdf:type> <gr:datatypeProductOrServiceProperty> . <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdfs:subPropertyOf> <gr:datatypeProductOrServiceProperty> . } WHERE { ?s ?p ?o }
<td><a href="/balancer-manager?b=cm-cluster&w=ajp://c1:8009&nonce=db03d89e-df98-4661-9d6d-58c382e03347">ajp://c1:8009</a></td><td>c1</td><td></td><td>1</td><td>0</td><td>Init Ok </td><td>0</td><td> 0 </td><td> 0 </td></tr>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1292 100 1292 0 0 39287 0 --:--:-- --:--:-- --:--:-- 1261k
# Gives back only the two items we add
CONSTRUCT { <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdf:type> <gr:datatypeProductOrServiceProperty> . <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdfs:subPropertyOf> <gr:datatypeProductOrServiceProperty> } WHERE { GRAPH <http://example.com/file.owl> { ?s ?p ?o } . }
# Gives back nothing
CONSTRUCT { <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdf:type> <gr:datatypeProductOrServiceProperty> . <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdfs:subPropertyOf> <gr:datatypeProductOrServiceProperty> } WHERE { GRAPH <http://example.com/file.owl> { <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdf:type> <gr:datatypeProductOrServiceProperty> . <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdfs:subPropertyOf> <gr:datatypeProductOrServiceProperty> } . }
# Gives back nothing
CONSTRUCT { ?s ?p ?o } WHERE { GRAPH <http://example.com/file.owl> { <http://rdf4ecommerce.esolda.com/digitalcamera#sensor> <rdf:type> <g
<%= f.label :set_switch %><br />
<%= f.select(:set_switch, options_for_select(["Single sets", "All sets at once"]))%>
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command