Skip to content

Instantly share code, notes, and snippets.

@hanjin66
hanjin66 / read-write-file.js
Created February 14, 2019 06:35
Read Write to file with javascript
/// write to file
var txtFile = "c:/test.txt";
var file = new File(txtFile);
var str = "My string of text";
file.open("w"); // open file with write access
file.writeln("First line of text");
file.writeln("Second line of text " + str);
file.write(str);
file.close();
@hanjin66
hanjin66 / gist:847ba45df5b776dd783a6b4af3928804
Created November 10, 2017 05:07
Verifying my Blockstack ID is secured with the address 1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK https://explorer.blockstack.org/address/1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK
Verifying my Blockstack ID is secured with the address 1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK https://explorer.blockstack.org/address/1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK
@hanjin66
hanjin66 / blockstack
Created November 10, 2017 03:28
Verifying my Blockstack ID is secured with the address
1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK https://explorer.blockstack.org/address/1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK
@hanjin66
hanjin66 / gist:60df51570fd0263b4970d7cf4c09c51c
Created November 10, 2017 03:27
Verifying my Blockstack ID is secured with the address 1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK https://explorer.blockstack.org/address/1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK
Verifying my Blockstack ID is secured with the address 1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK https://explorer.blockstack.org/address/1HC1QCbk5KQTtYnQrhzukQc5JDZcPn2zhK
@hanjin66
hanjin66 / background.js
Last active February 10, 2017 06:09 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});