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
var p = require('../package.json'); | |
var version = p.version.split('.').shift(); | |
module.exports = { | |
restApiRoot: '/api' + (version > 0 ? '/v' + version : ''), | |
host: process.env.HOST || 'localhost', | |
port: process.env.PORT || 3000 | |
}; |
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
node_modules | |
dist | |
.tmp | |
.sass-cache | |
bower_components |
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
#!/usr/bin/env python3 | |
mail = open('ssl_elastic.json', 'w') | |
for line in open('ssl_fixed.json', 'r', encoding = "ISO-8859-1"): | |
mail.write( '{ "create":{ }} \n' + line ) |
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
# export mongo db as json data | |
mongoexport -d corex1 -c data -o data.json | |
# to fix " contains an unknown parameter [$oid]" need to delete key with JQ command | |
sudo apt-get install jq | |
jq -c 'del(._id)' data.json > tmp.$$.json && mv tmp.$$.json data_fixed.json | |
# also lets fix date field eg "t":{"$date":1463606674833} | |
# hardcoded time for now | |
jq -c '. + {t: 1469998152}' data_fixed.json > tmp.$$.json && mv tmp.$$.json data_fixed.json |
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
//---- Appened STYLE | |
//document.getElementsByTagName('html')[0].innerHTML+='<style>*{color:#fff}</style>' | |
StringBuilder extraStyles = new StringBuilder(); | |
extraStyles.append("javascript:(function extra(){"); | |
if(getResources().getBoolean(R.bool.extraCss)){ | |
extraStyles.append( | |
"var aa =document.createElement(\"link\");" + | |
"aa.type='text/css'; aa.rel='stylesheet'; "+ | |
"aa.href='"+getResources().getString(R.string.extraCssUrl)+"';"+ | |
"document.getElementsByTagName(\"head\")[0].appendChild(aa);" |
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
Add to your blogspot blogger template | |
<meta expr:content='"0; url=http://www.jamesjara.com/redirect.php?a=" + data:blog.url' http-equiv='refresh'/> |