This is a simple index.html
template you can use for submitting PouchDB bug reports.
The live demo is available at http://bl.ocks.org/nolanlawson/816f138a51b86785d3e6.
This is a simple index.html
template you can use for submitting PouchDB bug reports.
The live demo is available at http://bl.ocks.org/nolanlawson/816f138a51b86785d3e6.
Change e.getSession().setMode(...)
to "ace/mode/<language>" where <language> is your preferred programming language to have proper syntax highlighting. Then copy and paste the code into your browser bar and edit away :D.
data:text/html,
<div class="e" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;" id="editor"></div>
<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var e = ace.edit("editor");
e.setTheme("ace/theme/monokai");
e.getSession().setMode("ace/mode/javascript");
var fs = require('fs'); | |
var localStore = require('./local-store'); | |
var store = new localStore.Store({ | |
path: '/var/data', | |
bucket: 'test' | |
}); | |
var data = fs.readFileSync('/etc/passwd'); |
var http = require('http'); | |
var concat = require('concat-stream'); | |
http.get(process.argv[2], function(res) { | |
res.pipe(concat(function(buf) { | |
var html = buf.toString(); | |
var re = /<a.*?href="(.*?)".*?>/gi; | |
var links = []; | |
var matches; | |
while(matches = re.exec(html)) { |
#http://www.dd-wrt.com/phpBB2/viewtopic.php?t=282831&start=435&sid=05c113416d737b2a58aa1a8708bb5e5b | |
#mount -o bind /mnt/sdb1 /jffs | |
#mount /dev/sda1 /jffs | |
mkdir -p /jffs/etc | |
mkdir -p /jffs/usr/local | |
mkdir -p /jffs/opt/bin/ | |
mkdir -p /jffs/tmp/ipkg/ | |
# Copy the contents of the current directories |
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { | |
menu = new MenuWrapper(menu) { | |
private MenuItem fix(MenuItem item) { | |
try { | |
Field f = item.getClass().getDeclaredField("mEmulateProviderVisibilityOverride"); | |
f.setAccessible(true); |
/** | |
* Carrega um script e executa callback | |
*/ | |
(function(window, document, head) { | |
if(!window.loadScript) { | |
window.loadScript = function(url, callback, scope, charset) { | |
var sc = document.createElement('script'); | |
sc.type = 'text/javascript'; | |
sc.async = true; | |
sc.charset = charset || "utf-8"; |
/* | |
Assuming jQuery Ajax instead of vanilla XHR | |
*/ | |
//Get Github Authorization Token with proper scope, print to console | |
$.ajax({ | |
url: 'https://api.github.com/authorizations', | |
type: 'POST', | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("Authorization", "Basic " + btoa("USERNAME:PASSWORD")); |