This file contains hidden or 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
The Atom sync-settings package will automatically sync settings across all Atom instances using this gist. |
This file contains hidden or 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
echo 'Running server tests with coverage' | |
node server/testing/load_test_fixtures.js | |
# Refer to https://github.com/gotwarlost/istanbul/issues/44#issuecomment-16093330 | |
# for issues around specific command syntax to run mocha with istanbul | |
# mocha -R xunit -O output=test-reports/mocha.xml 'server/testing/tests/**/*.js' | |
istanbul cover --report lcov --report clover _mocha -- -R xunit -O output=test-reports/mocha.xml 'tests/**/*.js' | |
# ensure that non-zero is returned for any failures | |
# because istanbul may return 0 even in case of a test failure | |
if [ -r test-reports/mocha.xml ]; then |
This file contains hidden or 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
# Add EPEL repository needed for exim | |
sudo curl -LO https://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
sudo rpm -ivh epel-release-6-8.noarch.rpm | |
sudo rm -f epel-release-6-8.noarch.rpm | |
sudo yum -y install exim | |
# Edit the configuration file at /etc/exim/exim.conf | |
# Do something like the following for small, automated configuration tweaks: | |
# sed -ie 's/domainlist relay_to_domains =/domainlist relay_to_domains = example.com/' /etc/exim/exim.conf |
This file contains hidden or 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
sudo iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-destination :587 |
This file contains hidden or 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
#if DEBUG | |
protected void Application_BeginRequest(object sender, System.EventArgs e) | |
{ | |
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*"); | |
if (HttpContext.Current.Request.HttpMethod == "OPTIONS") | |
{ | |
// These headers are handling the "pre-flight" OPTIONS call sent by the browser | |
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE"); | |
// Match these to those in the request |
This file contains hidden or 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
<script> | |
(function () { | |
// remove ng-app from body | |
function bootstrapApp() { | |
angular.element(document).ready(function () { | |
angular.bootstrap(document, ['myApp']); | |
}); | |
} | |
var key = window.localStorage.getItem('language'); |
This file contains hidden or 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
// Regex | |
var myAllergies = /\bmy (seasonal )?allergies\b/i; | |
var text = 'My allergies are acting up. I need some medicine.'; | |
if(text.search(myAllergies) > -1) { | |
} | |
// Object.defineProperty | |
function Car() { |
NewerOlder