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
function sieveOfAtkin(limit){ | |
var limitSqrt = Math.sqrt(limit); | |
var sieve = []; | |
var n; | |
//prime start from 2, and 3 | |
sieve[2] = true; | |
sieve[3] = true; | |
for (var x = 1; x <= limitSqrt; x++) { |
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
/** | |
* @desc this snippet will allow multiple arguments to a search query in Google Chrome | |
* examples include https://www.reddit.com/r/%s/search?q=%s | |
* @author Chris McCormack [email protected] | |
* @required Google Chrome. Replace all values in brackets ([]) with valid entries. | |
* To add to Chrome, go to Settings > Search [Manage search engines...] > Other search engines. | |
* At the bottom of this section, there are three required fields: | |
* [Add a new search engine] [Keyword] [URL with %s in place of query] | |
* - Add a new search engine: Descriptive name of your search | |
* - Keyword: used to trigger search. |
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
// url_to_drive.gs | |
// Google Apps Script | |
// Allows uploading a URL directly to Google Drive. | |
// | |
// Live link: | |
// https://script.google.com/macros/s/AKfycbzvhbHS4hnWPVBDHjQzZHA0qWq0GR-6hY7TbYsNto6hZ0MeAFZt/exec | |
// | |
// Source-code: | |
// https://gist.github.com/denilsonsa/8134679 | |
// https://script.google.com/d/1Ye-OEn1bDPcmeKSe4gb0YSK83RPMc4sZJt79SRt-GRY653gm2qVUptoE/edit |