- Откройте ваш файл и выберите "Инструменты"
- Выберите "Редактор скриптов"
- В появившемся окне вставьте первый скрипт (JS)
- Создайте на своем диске папку, куда будут складываться файлы
- Перейдите в новую папку
- Скопируйте в адресной строке ID папки (выглядит он примерно так 1jaST3NoIg63d0x0A1K7ppje8ZTjCWvIP)
- В функции saveFile замените значение ID на свой
- Нажмите иконку "Сохранить проект"
- Нажмите плюсик напротив "Файлы", чтобы добавить файл
- Выберите HTML
View proportional-scale.js
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
var $el = $("#very-specific-design"); | |
var elHeight = $el.outerHeight(); | |
var elWidth = $el.outerWidth(); | |
var $wrapper = $("#scaleable-wrapper"); | |
$wrapper.resizable({ | |
resize: doResize | |
}); |
View google-drive-upload.md
View kibana.md
Kibana + Elasticsearch
Установка
➜ brew tap elastic/tap
➜ brew install elastic/tap/kibana-full
➜ brew install elastic/tap/elasticsearch-full
View strace.md
File activity
strace -e trace=file -fp PID
(file) or strace -e trace=desc -fp PID
(file descriptors)
Common calls:
access
close
– close file handlefchmod
– change file permissionsfchown
– change file ownership
View colors.sh
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
printf '\e[%sm▒' {30..37} 0; echo ### foreground | |
printf '\e[%sm ' {40..47} 0; echo ### background |
View gist:ebd2a90ae7b43d2b743a16c002a1d10e
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
'use strict'; | |
let AccountManager = require('@qa/account-manager'); | |
let WebDriverIOUtils = require('@qa/wdio-utils'); | |
let capabilities = require('@qa/wdio-capabilities'); | |
let MochaHooks = require.resolve('@qa/wdio-mocha-hooks'); | |
let minimist = require('minimist'); | |
let VisualRegressionCompare = require('wdio-visual-regression-service/compare'); |
View gist:1edf3f8b400944372a27cb4e491d302c
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>en</string> | |
<key>CFBundleDisplayName</key> | |
<string>PokerFace</string> | |
<key>CFBundleExecutable</key> | |
<string>$(EXECUTABLE_NAME)</string> |
View html5-video-streamer.js
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
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
View index.js
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
// Usage | |
<Router> | |
<Provider store={store}> | |
<ListeningRouter> | |
<Main /> | |
</ListeningRouter> | |
</Provider> | |
</Router> |
View file.js
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
var React = { | |
createElement: function (tag, attrs, children) { | |
var e = document.createElement(tag); | |
// Add attributes | |
for (var name in attrs) { | |
if (name && attrs.hasOwnProperty(name)) { | |
var v = attrs[name]; | |
if (v === true) { | |
e.setAttribute(name, name); |
NewerOlder