Radical Mode will make your browsing experience much more radical than you are used to. You will literally want to buy me a beer. And you should.
Check it out here:
| var getCaretYPosition = function(){ | |
| var editor = CKEDITOR.instances.editor1, //get your CKEDITOR instance here | |
| sel = editor.getSelection(), // text selection | |
| obj = sel.getStartElement().$, // the element the selected text resides in | |
| range = editor.getSelection().getRanges(), // range of selection | |
| container = range[0].startContainer.$, // get the DOM node of the selected text, probably a textnode | |
| textlen = typeof obj.textContent === "undefined" ? obj.innerText.length : obj.textContent.length, // get the length of the text in the container | |
| offset = range[0].startOffset; // get the offset from the beginning of the text in the container to the caret | |
| if (container.nodeType === 3) { // if the container is a text node | |
| while (container.previousSibling) { // add the length of all the preceding text nodes and elements in the same parent element |
| <?php | |
| /** | |
| * Slim archiving class. | |
| * | |
| * Slim is a portable file archive format based on JSON. It can be self | |
| * extracting in multiple languages. | |
| * | |
| * @license https://www.apache.org/licenses/LICENSE-2.0 | |
| * @author Hunter Perrin <[email protected]> |
| try { | |
| const entities = await Nymph.getEntities( | |
| {'class': BlogPost.class}, | |
| {'type': '&', | |
| 'like': ['title', '%easy%'], | |
| 'equal': ['archived', false] | |
| } | |
| ); | |
| console.log(entities); | |
| } catch (e) { |
| function titleSeach (title, archived) { | |
| return fetch( | |
| '/api/titlesearch.php?title=' + | |
| encodeURIComponent(title) + | |
| '&archived=' + | |
| encodeURIComponent(JSON.stringify(archived)) | |
| ).then(res => { | |
| if (!res.ok) return Promise.reject(res); | |
| return res.json() | |
| }); |
Radical Mode will make your browsing experience much more radical than you are used to. You will literally want to buy me a beer. And you should.
Check it out here:
| /*! | |
| * Bootstrap v3.3.7 (http://getbootstrap.com) | |
| * Copyright 2011-2016 Twitter, Inc. | |
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
| */ | |
| /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | |
| html { | |
| font-family: sans-serif; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; |
| <html> | |
| <body style="font-size: 16pt;"> | |
| <p style="text-align: center;">Email: <a href="mailto:[email protected]">[email protected]</a></p> | |
| <p style="text-align: center;">Cell: <a href="tel:+18582292679">858-229-2679</a></p> | |
| </body> | |
| </html> |
| Array.prototype.insertInOrder = function(item) { | |
| for (var i = 0; this[i] < item && i < this.length; i++); | |
| this.splice(i, 0, item); | |
| }; |
| export default function strRepeat (str, repeat) { | |
| let curStr = str, i = 1, result = ''; | |
| while (true) { | |
| if (i & repeat) result += curStr; | |
| i *= 2; | |
| if (i >= repeat) break; | |
| curStr += curStr; | |
| } | |
| return result; | |
| } |
| // Returns true about 50% of the time, false about 50% of the time. | |
| export default const maybe = () => Math.random() < .5; | |
| // This should be closer to .5 the more iterations you run. | |
| export const tester = iterations => { | |
| let yes = 0; | |
| for (let i = 0; i < iterations; i++) maybe() && yes++; | |
| return yes/iterations; | |
| } |