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
// taken from http://stackoverflow.com/questions/6290053/setting-access-control-allow-origin-in-asp-net-mvc-simplest-possible-method | |
// For MVC | |
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
filterContext.RequestContext.HttpContext.Response.AddHeader("Access-Control-Allow-Origin", "*"); | |
base.OnActionExecuting(filterContext); | |
} |
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
kCFURLErrorUnknown = -998, | |
kCFURLErrorCancelled = -999, | |
kCFURLErrorBadURL = -1000, | |
kCFURLErrorTimedOut = -1001, | |
kCFURLErrorUnsupportedURL = -1002, | |
kCFURLErrorCannotFindHost = -1003, | |
kCFURLErrorCannotConnectToHost = -1004, | |
kCFURLErrorNetworkConnectionLost = -1005, | |
kCFURLErrorDNSLookupFailed = -1006, | |
kCFURLErrorHTTPTooManyRedirects = -1007, |
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
protected void Application_BeginRequest() | |
{ | |
// Redirect to https always | |
if (!Context.Request.IsLocal && !Context.Request.IsSecureConnection) | |
Response.Redirect(Context.Request.Url.ToString().Replace("http:", "https:")); | |
} |
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
[2014-08-04 13:01:45,041][ERROR][de.saly.elasticsearch.river.imap.IMAPRiver] Unable to start IMAPRiver due to org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'intervaltrigger' and group: 'group1', because one already exists with this identification. | |
org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'intervaltrigger' and group: 'group1', because one already exists with this identification. | |
at org.quartz.simpl.RAMJobStore.storeTrigger(RAMJobStore.java:415) | |
at org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:252) | |
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) | |
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) | |
at de.saly.elasticsearch.river.imap.IMAPRiver.start(IMAPRiver.java:283) | |
at org.elasticsearch.river.RiversService.createRiver(RiversService.java:148) | |
at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:275) | |
at org.elasticsearch.river.RiversService$ApplyRiver |
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
@@ -42,7 +42,8 @@ function autocomplete() { | |
theme: 'facebook', | |
hintText: null, | |
searchingText: '...', | |
- preventDuplicate: true | |
+ preventDuplicate: true, | |
+ crossDomain: false | |
}); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CssPath | |
{ | |
public static class By | |
{ |
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
curl ip.appspot.com | |
sudo ipconfig set en0 BOOTP | |
sudo ipconfig set en0 DHCP | |
curl ip.appspot.com |
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
import sys | |
import os | |
import subprocess | |
def execute( command): | |
result = "" | |
try: | |
result = os.popen( command ).read() | |
except Exception: |