Skip to content

Instantly share code, notes, and snippets.

View enigmatikme's full-sized avatar

Karin Hsu enigmatikme

  • Federato
  • San Francisco
View GitHub Profile
@enigmatikme
enigmatikme / rpsproxy.js
Created October 12, 2018 23:50
RPS for Proxy w/ Setup
import http from 'k6/http';
import { check, sleep } from 'k6';
//If you want to avoid having to type --vus 10 and --duration 30s
export let options = {
vus: 50,
rps: 2000,
duration: '1m'
};
import http from 'k6/http';
import { check, sleep } from 'k6';
//If you want to avoid having to type --vus 10 and --duration 30s
export let options = {
vus: 500,
rps: 2000,
duration: '1m'
};
import http from 'k6/http';
import { check, sleep } from 'k6';
//If you want to avoid having to type --vus 10 and --duration 30s
export let options = {
vus: 500,
rps: 2000,
duration: '1m'
};
-- Postgres
-- Read
select * from popularsongs.artists, popularsongs.albums, popularsongs.songs where artists.id = 9999999 and albums."artistID"= artists.id and songs."artistID"=artists.id;
-- Insert
INSERT INTO "popularsongs"."albums"("artistID", "name", "imageUrl", "yearPublished") VALUES(1000001, 'John Doe', 'wwww.clonethis.com', 1999) RETURNING "artistID", "name", "imageUrl", "yearPublished";
-- Cassandra
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<link href="./styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="app">
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
@enigmatikme
enigmatikme / gist:3473f2e6cd062c152ec678921ff69165
Created September 11, 2018 00:43
Jalapeno Business - api example
/recommendations/1
[
{
"publicationsList": [
{
"img": "http://lorempixel.com/640/480/nightlife",
"title": "quibusdam quisquam iusto",
"url": "http://lorempixel.com/640/480"
},
{
//No pseudocode as requested by prompt
function CashAmount(val) {
this.val = val;
console.log(this.val);
}
CashAmount.prototype.totalInPennies = function(val) {
return this.val * 100;
}
// @JOHN DO NOT CONTINUE.
// this is all original code, nothing added.
// sorry you read this far.
// ORIGINAL
const dog = {
name: 'Scout',
breed: ['Husky', 'German Shepherd'],
age: 4,
happiness: 50,