Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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
// ==UserScript== | |
// @name SfccDocAdRemover | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include https://sfcclearning.com/* | |
// @grant GM_addStyle | |
// @run-at document-idle | |
// ==/UserScript== |
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
/** | |
* This class takes an Excel spreadsheet and converts it into a Guava Table format. | |
* When other formats of the file are to be supported (like CSV, TSV etc.,) implement the apply method with that format. | |
*/ | |
@Component | |
public class ExcelToTableLoader implements TableGenerator<File> { | |
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(ExcelToTableLoader.class); |
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
1. Перезапустить контейнер с другими параметрами | |
Есть такая утилита runlike - https://github.com/lavie/runlike/ | |
Запустив runlike -p <имяконтейнера>, вы получите готовую команду для запуска с теми же параметрами, которые были использованы изначально. | |
Например, для какого-то тестового сервиса команда и вывод может выглядеть следующим образом: | |
runlike -p testservice вернет | |
docker run \ | |
--name=testservice \ | |
--user=test \ | |
-p 8015:8080 \ | |
--restart=always \ |
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
const buffer = require('buffer'); | |
const crypto = require('crypto'); | |
// Demo implementation of using `aes-256-gcm` with node.js's `crypto` lib. | |
const aes256gcm = (key) => { | |
const ALGO = 'aes-256-gcm'; | |
// encrypt returns base64-encoded ciphertext | |
const encrypt = (str) => { | |
// Hint: the `iv` should be unique (but not necessarily random). |
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
// Save common tests in a global variable | |
postman.setGlobalVariable("commonTests", () => { | |
// The Content-Type must be JSON | |
tests["Content-Type header is set"] = postman.getResponseHeader("Content-Type") === "application/json"; | |
// The response time must be less than 500 milliseconds | |
tests["Response time is acceptable"] = responseTime < 500; | |
// The response body must include an "id" property | |
var data = JSON.parse(responseBody); |
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
package webdav.support; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import com.google.common.base.Preconditions; | |
import org.apache.commons.lang3.tuple.Pair; | |
public class RangeSpecification { |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
/* | |
Please make sure to add the following environment variables: | |
HEROKU_PREVIEW=<your heroku preview app> | |
HEROKU_PREPRODUCTION=<your heroku pre-production app> | |
HEROKU_PRODUCTION=<your heroku production app> |
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
---------------------------------------------------------------------------- | |
java-client tries to detect id element isDisplayed() with atom execution: | |
---------------------------------------------------------------------------- | |
2018-10-11 05:26:50:938 - [HTTP] --> POST /wd/hub/session/43c81083-c3a6-4def-9bab-91f046ff21b0/execute/sync | |
2018-10-11 05:26:50:938 - [HTTP] {"script":"return (function(){return function(){var k=this;function l(a){return void 0!==a}function m(a){return\"string\"==typeof a}function aa(a,b){a=a.split(\".\");var c=k;a[0]in c||!c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&l(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}\nfunction ba(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a |
NewerOlder