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
// Load testing of http-proxy node library. | |
// $ docker run -it --rm bash:4.4 | |
// $ docker run -it --rm node:12-alpine sh | |
// # mkdir -p /test && cd /test && wget https://github.com/tsenart/vegeta/releases/download/v12.8.3/vegeta-12.8.3-linux-amd64.tar.gz && tar -xvf vegeta-12.8.3-linux-amd64.tar.gz | |
// # wget -O - https://gist.githubusercontent.com/ZitRos/c0d0ea80c0de4d018121c80c5d2c3653/raw/node-http-proxy-load-test.js > index.js && npm install http-proxy | |
// # node index.js & sleep 0.5 && echo 'GET http://localhost/favicon.ico' | ./vegeta attack -rate 15 -duration 5s | ./vegeta report -every 1s && pkill node | |
const http = require('http'); | |
const httpProxy = require('http-proxy'); |
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
=1173002295&_v=j83&z=1887421163 | |
2020-06-21T20:41:02.409Z proxied: stats.g.doubleclick.net/r/collect?v=1&aip=1&t=dc&_r=3&tid=UA-55446531-20&cid=9257118.1592772062&jid=779824401&_gid=218034169.1592772062&gjid=52807921&_v=j83&z=1610133504 | |
2020-06-21T20:41:03.025Z proxied: www.googletagmanager.com/gtag/js?id=UA-55446531-20 | |
2020-06-21T20:41:03.096Z proxied: www.googletagmanager.com/gtag/js?id=UA-55446531-20 | |
2020-06-21T20:41:03.184Z proxied: www.googletagmanager.com/gtag/js?id=UA-55446531-20 | |
2020-06-21T20:41:03.425Z proxied: www.google-analytics.com/r/collect?v=1&_v=j83&a=1390828066&t=pageview&_s=1&dl=https%3A%2F%2Fwww.freecodecamp.org%2Fnews%2Fhow-to-delete-a-git-branch-both-locally-and-remotely%2F&dr=https%3A%2F%2Fwww.google.com%2F&ul=en-us&de=UTF-8&dt=How%20to%20Delete%20a%20Git%20Branch%20Both%20Locally%20and%20Remotely&sd=30-bit&sr=1680x1050&vp=918x948&je=0&_u=AACAAUAB~&jid=953499377&gjid=1340825163&cid=1651878937.1592524654&tid=UA-55446531-20&_gid=1139165038.1592753739&_r=1>m=2ou6a0&z=1634154742&uip=108.26. |
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
pragma solidity 0.4.23; | |
contract TEST { | |
string public someVal; | |
string public someVal2; | |
bytes32 public signature1 = keccak256( | |
"address TEST TEST TEST TEST", | |
"address TEST TEST TEST TEST TEST TEST", |
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
function deepCloneWithStyles (node) { | |
const style = window.getComputedStyle(document.body, null); | |
const clone = node.cloneNode(false); | |
if (clone.style && style.cssText) | |
clone.style.cssText = style.cssText; | |
for (let child of node.childNodes) | |
clone.appendChild(deepClone(child)); | |
return clone; | |
} |
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
/** | |
* Just a piece of code to start. | |
*/ | |
const host = "127.0.0.1:57772"; | |
let ws = new WebSocket(`ws://${ host }/csp/user/WebCourse.ChatWebSocket.cls`); | |
ws.addEventListener(`open`, () => { | |
console.log(`We are connected to the chat!`); | |
}); |
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
/// Original: https://github.com/eduard93/Utils/blob/master/Utils/REST.cls.xml | |
Class Utils.REST Extends %CSP.REST | |
{ | |
XData UrlMap | |
{ | |
<Routes> | |
<Route Url="/file" Method="GET" Call="GET"/> | |
</Routes> | |
} |
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
/** | |
* Semantic versioning versions compare. | |
* @param {string} high | |
* @param {string} low | |
* @returns {boolean} | |
* @author ZitRo ([email protected]) | |
* @license MIT http://www.opensource.org/licenses/mit-license.php | |
*/ | |
function versionGT (high, low) { | |
let v1 = high.split(/[\-\.]/g), |
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"?> | |
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.2 (Build 590U)" ts="2016-03-15 00:40:16"> | |
<Class name="MyPackage.Installer"> | |
<CompileAfter>MyPackage.REST</CompileAfter> | |
<Super>%Projection.AbstractProjection</Super> | |
<TimeChanged>63992,1953.207424</TimeChanged> | |
<TimeCreated>63992,1916.587195</TimeCreated> | |
<Parameter name="WebAppName"> | |
<Type>%String</Type> |
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
<Routes> | |
<!-- Self-documenting links variant: allow <Route> tag to nest additional info --> | |
<Route Url="/posts" Method="GET" Call="ShowPosts"> | |
<!-- One of many variants, most applicable for Caché XData scheme on my opinion --> | |
<!-- Nested <Link>s tell what we can do with the current element --> | |
<Link rel="add" method="POST" href="/posts"/> | |
<Link rel="next" method="POST" href="/posts/:page"/> | |
<!-- Nested <LinkGroup>s tell what we can do with the content on the page --> | |
<LinkGroup name="post"> |
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
/** | |
* Code snippet for students ^^ | |
* Tarnavsky used this function to find t^-1 from prime number t and m. | |
* Usage: var tMinusOne = getRevT(m, t); | |
* Test case 1: getRevT(121, 5) === 97 | |
* Test case 2: getRevT(9, 7) === 13 | |
*/ | |
function getRevT (m, t) { | |
function stage (a, b) { | |
var r = a % b, q = Math.floor(a/b); |
NewerOlder