This file contains hidden or 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
/* global Ext */ | |
/** | |
* Restore filters grid plugin. | |
* | |
* To use this plugin just add to your grid | |
* 1. `'Ext.ux.grid.RestoreFilters'` in `requires` property | |
* 2. `ptype: 'gridrestorefilters'` in `plugins` property | |
* 3. and `restoreableFilters` array as a setting for the plugin (see below) | |
* |
This file contains hidden or 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
// ==UserScript== | |
// @id iitc-plugin-keyhunt-keys@3ch01c | |
// @name IITC plugin: keyhunt-keys | |
// @category Misc | |
// @version 0.0.3.20160405.143600 | |
// @namespace https://github.com/3ch01c/ingress-intel-total-conversion | |
// @description This is a plugin which assists you in hunting keys from certain area. Effectively allows to tick a portal for which you have a key. Switch to "keyhunt" highlighter (included in this plugin) to show in red which keys you are still missing (the portal for which you haven't entered data yet will be orange, other will be green). Use 'sync' plugin to share data between multiple browsers or desktop/mobile. Use keyhunt plugin with 'portals-list' plugin to quickly tick many portals on a list. | |
// @include https://www.ingress.com/intel* | |
// @include http://www.ingress.com/intel* | |
// @match https://www.ingress.com/intel* |
This file contains hidden or 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
/** | |
* Pad class. | |
* | |
* @author Maciej "Nux" Jaros | |
* @license CC-BY | |
* | |
* Note! The class becomes faster with new itterations. | |
*/ | |
NuxPadder = function (character) | |
{ |
This file contains hidden or 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
/** | |
* Class providing caching for data objects. | |
* | |
* It's assumed that the data comes from some remote service (otherwise there is no point in caching). | |
* | |
* @param {String} dataKey Globally(!) unique key to store data. | |
* @param {Storage} storageService Storage service that should have two functions: | |
* storageService.set(key, value) -- set data | |
* storageService.get(key) -- get data | |
* Will attempt fallback to `$.jStorage` if not secified. |
This file contains hidden or 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 keys = Object.keys(localStorage); | |
var total = 0; | |
for (var i in keys) { | |
var key = keys[i]; | |
var size = localStorage[key].length; | |
console.log(key, ' size ', getReadableFileSizeString(size)); | |
total += size; | |
} | |
console.log('\n-------\ntotal size ', getReadableFileSizeString(total)); |
This file contains hidden or 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
/** | |
* Utility for console logs preservation. | |
* | |
* @example Enable logs preservation for next page load: | |
* logPreservation.enable(); | |
* | |
* @example Dump, but keep log entries for another dump: | |
* logPreservation.dump(true); | |
* | |
* @author Maciej Nux Jaros |
This file contains hidden or 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
<!-- with and without JS visibility and display --> | |
<style type="text/css"> | |
.withJSvisible {visibility: hidden} | |
.withJSdisplay {display:none} | |
</style> | |
<script type="text/javascript"> | |
document.write(String.fromCharCode(60),'style type="text/css"',String.fromCharCode(62), | |
' .withJSvisible {visibility:visible !important} ', | |
' .withoutJSvisible {visibility:hidden !important} ', | |
This file contains hidden or 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
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. | |
* | |
* More on `onOpen` and other trigger functions: https://developers.google.com/apps-script/guides/triggers/ | |
* More on `SpreadsheetApp` class: https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app | |
*/ | |
function onOpen() { | |
// Add a menu with some items, some separators, and a sub-menu. | |
SpreadsheetApp.getUi().createMenu('Utilities') |
This file contains hidden or 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
/** | |
* Helper class for testing match of an array of strings. | |
* | |
* @param {Array} strings Array of strings to be prepared and used in search. | |
* @param {String} regExpFlags Flags passed to RegExp (g/i/m). | |
*/ | |
class ReArray { | |
constructor(strings, regExpFlags, exactMatch) { | |
this._reArray = []; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.editarea { | |
border: 1px solid black; | |
background: white; |