| lol1 | lol2 |
| lol3 | lol4 |
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 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
| function declOfNum(number, titles) { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } | |
| use: | |
| declOfNum(count, ['найдена', 'найдено', 'найдены']); |
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
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
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
| (ns birch.core | |
| (:require [clojure.string :as str])) | |
| ;; (println ">>>" (first *command-line-args*)) | |
| (def node-fs (js/require "fs")) | |
| (def node-path (js/require "path")) | |
| (def read-dir (.-readdirSync node-fs)) | |
| (def stat (.-statSync node-fs)) |
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
| /** | |
| * Copyright 2017 Google Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| /** | |
| * Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
| * load <script nomodule> anyway. This snippet solve this problem, but only for script | |
| * tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
| * | |
| * Again: this will **not** prevent inline script, e.g.: | |
| * <script nomodule>alert('no modules');</script>. | |
| * | |
| * This workaround is possible because Safari supports the non-standard 'beforeload' event. | |
| * This allows us to trap the module and nomodule load. |
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> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| background-color: #CCC; | |
| box-sizing: border-box; | |
| } | |
| .item { | |
| margin: 20px; | |
| padding: 20px; |
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
| #!/bin/bash | |
| FUZZ="0.0% 0.5% 1.0% 1.5% 2.0% 2.5% 3.0%" | |
| COLORS="128 256" | |
| CONV_OPTS="-resize 450 -layers optimize-plus -layers optimize-transparency" | |
| mkdir output | |
| for f in $FUZZ; do | |
| convert +repage -fuzz $f -delay 4 -loop 0 $@ $CONV_OPTS ./output/im-$f.gif | |
| for c in $COLORS; do |
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
| _registry = {}; | |
| importPolyfill = path => { | |
| if(!(path in _registry)) { | |
| const entry = _registry[path] = {}; | |
| entry.promise = new Promise(resolve => entry.resolve = resolve); | |
| document.head.appendChild(Object.assign( | |
| document.createElement('script'), | |
| { | |
| type: 'module', | |
| innerText: `import * as X from '${path}'; _registry['${path}'].resolve(X);`, |