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
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
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
desc "Generate a new key" | |
task :gen_key do | |
domain = get_env(:domain) | |
filename = "#{domain}.key" | |
`openssl genrsa -out #{filename} 2048` | |
end | |
desc "Generate a new CSR" | |
task :gen_csr => :gen_key do |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<link href="styles.css" rel="stylesheet" type="text/css" /> | |
<title>"Percent complete" bar</title> | |
</head> |
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
require('config/adapters/faye-adapter'); | |
export default DS.FayeAdapter.extend(); |
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
function valueFromObjectPath(obj, path) { | |
var steps = path.split(/\//); | |
var val = obj; | |
while (steps.length) { | |
var key = steps.shift(); | |
if (typeof(val[key]) !== 'undefined') { | |
val = val[ key ]; | |
} else { |
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
require 'nokogiri' | |
file = File.read("dirty.xml") | |
xml = Nokogiri::XML(file) | |
# xml.xpath("//location").each do |node| | |
# node.content = node.content.gsub(/\n\s+/, " ") | |
# end | |
File.open("clean.xml", "w") do |f| |
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
# .local/share/applications/eclipse.desktop | |
[Desktop Entry] | |
Type=Application | |
Name=Eclipse | |
Comment=Eclipse Integrated Development Environment | |
Icon=/opt/eclipse/icon.xpm | |
Exec=/opt/eclipse/eclipse | |
Terminal=false | |
Categories=Development;IDE;Java; |
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
[Desktop Entry] | |
Type=Application | |
Name=Android Studio | |
Comment=Android Studio Integrated Development Environment | |
Icon=/opt/android-studio/bin/androidstudio.ico | |
Exec=/opt/android-studio/bin/studio.sh | |
Terminal=false | |
Categories=Development;IDE;Java;Android |
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
connect: { | |
app: { | |
options: { | |
port : 9000, | |
base : '<%= appRoot %>/', | |
open : true, | |
livereload : true, | |
hostname : '127.0.0.1' | |
middleware : function(connect) { | |
return [ |
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
function listServices(mod, r) { | |
var inj = angular.element(document).injector().get; | |
if (!r) { | |
r = {}; | |
} | |
angular.forEach(angular.module(mod).requires, | |
function(m) { | |
listServices(m,r) | |
}); | |
angular.forEach(angular.module(mod)._invokeQueue, |