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
/*Does not work as is just the basic idea*/ | |
var fs; //chrome.syncFileSystem.requestFileSystem(); | |
var reader = new FileReader(); | |
var file,data; | |
fs.root.getFile("somefile.txt",{},function(a){file = a;}); | |
reader.onloadend = function(){data=this.result;}; | |
file.file(function(f){reader.readAsText(f);}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
//2d Vector class (based on Vector.js) | |
var Vector = function(x,y){ this.x = x || 0; this.y = y || 0; }; | |
Vector.prototype={ | |
rot: function(a) { | |
var theta = a * Math.PI/180, | |
cs = Math.cos(theta), | |
sn = Math.sin(theta), | |
px = this.x * cs - this.y * sn; | |
py = this.x * sn + this.y * cs; | |
this.x = px; |
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
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
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
This is a file with emojis & ascii chars | |
🔗 | |
☘️ | |
¢ | |
£ | |
® |