Skip to content

Instantly share code, notes, and snippets.

View nodesocket's full-sized avatar

Justin Keller nodesocket

View GitHub Profile
@nodesocket
nodesocket / gist:4745284
Created February 9, 2013 13:15
Access-Control-Allow-Origin not working as expected
Request URL:https://mydomainhere.com/actions/get_stats.php
Request Method:POST
Status Code:200 OK
- REQUEST HEADERS -
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
rs-san-jose:SECONDARY> rs.status()
{
"set" : "rs-san-jose",
"date" : ISODate("2013-02-03T20:27:34Z"),
"myState" : 2,
"syncingTo" : "10.52.30.69:27017",
"members" : [
{
"_id" : 0,
"name" : "10.52.30.71:27017",
rs-san-jose:PRIMARY> rs.config()
{
"_id" : "rs-san-jose",
"version" : 6,
"members" : [
{
"_id" : 0,
"host" : "10.52.30.71:27017",
"priority" : 2,
"tags" : {
rs-san-jose:PRIMARY> rs.status()
{
"set" : "rs-san-jose",
"date" : ISODate("2013-02-03T20:24:30Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "10.52.30.71:27017",
"health" : 1,
<?php
$domains_path = "/srv/www/domains";
$full_path = $domains_path . "/commando.io";
$repo = "[email protected]:nodesocket/commando.io.git";
if(is_dir($full_path)) {
exec("cd $full_path && git pull");
echo '{"pull":true}';
} else {
exec("cd $domains_path && git clone $repo");
location ~ \.(?:css|js)$ {
set $no_cache 0
if ($http_method ~ (GET|HEAD)) {
set $no_cache 1;
}
...
proxy_no_cache $no_cache;
...
}
location ~* \.(?:css|js)$ {
allow 64.3.62.1;
deny all;
...
}
<div class="well kbase">
<h3>Contents</h3>
<table class="table">
<tbody>
<tr>
<td width="50%"><a class="btn btn-large btn-primary" href="/howto/create-edge-rule/">Create a Rule</a> <a class="btn btn-large btn-primary" href="/howto/delete-edge-rule/">Delete a Rule</a> <a class="btn btn-large btn-primary" href="/howto/edit-edge-rule/">Edit a Rule</a></td>
<td width="50%"><a class="btn btn-large btn-primary" href="/edge-rule-examples/301-redirect/">301 Redirect</a></td>
</tr>
</tbody>
</table>
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d8b.d8b. .d8888b. 88d888b. .d888b88 .d8888b. dP .d8888b.
88 88' `88 88'`88'`88 88'`88'`88 88' `88 88' `88 88' `88 88' `88 88 88' `88
Y8. .88 88. .88 88 88 88 88 88 88 88. .88 88 88 88. .88 88. .88 dP 88 88. .88
Y88888P' `88888P' dP dP dP dP dP dP `88888P8 dP dP `88888P8 `88888P' 88 dP `88888P'
[email protected]
a88888b. dP oo
d8' `88 88
88 .d8888b. 88d8b.d8b. 88d8b.d8b. .d8888b. 88d888b. .d888b88 .d8888b. dP .d8888b.
88 88' `88 88'`88'`88 88'`88'`88 88' `88 88' `88 88' `88 88' `88 88 88' `88
Y8. .88 88. .88 88 88 88 88 88 88 88. .88 88 88 88. .88 88. .88 dP 88 88. .88
Y88888P' `88888P' dP dP dP dP dP dP `88888P8 dP dP `88888P8 `88888P' 88 dP `88888P'
[email protected]
00:07:56 up 23 days, 22:02, 0 users, load average: 0.00, 0.00, 0.00