Skip to content

Instantly share code, notes, and snippets.

View lazycipher's full-sized avatar
🛡️
Stealth Mode

Himanshu Singh lazycipher

🛡️
Stealth Mode
View GitHub Profile
@lazycipher
lazycipher / Drinks Choosing Codeforces 1195A.cpp
Created January 18, 2021 15:20
Drinks Choosing Codeforces
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
@lazycipher
lazycipher / fileToBuffer.js
Created November 26, 2020 14:20
Convert File to buffer using multer
// type of files allowed
const fileFilter = (req, file, cb) => {
if (file.originalname.match(/\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF)$/)) {
cb(null, true)
} else {
cb(null, false)
}
}
const storage = multer.memoryStorage()
@lazycipher
lazycipher / uploader.js
Created November 26, 2020 13:43
upload to aws using multer and multers3
const s3Config = new aws.S3({
accessKeyId: process.env.AWS_ACCESS_KEY,
secretAccessKey: process.env.AWS_SECRET_KEY,
// sessionToken:'', // In most of the cases it's not needed. If using AWS Educate, you'll need this.
region: process.env.AWS_STORAGE_REGION
})
const multerS3Config = multerS3({
s3: s3Config,
bucket: process.env.AWS_BUCKET_NAME,
@lazycipher
lazycipher / After Solving click issues 15-06-2020.output
Last active June 15, 2020 11:36
Fireforx Output After Solving clickable issues
tests_run(filter="renderer")
[1] "axis angle rotate"
[1] 0.75
[1] "One character value"
[1] "coord"
[1] "facet-coord"
[1] "facet lines"
[1] "facet_grid(space=\"free\")"
[1] "facet-trivial"
[1] "facet-strips"
@lazycipher
lazycipher / output-firefox
Created June 12, 2020 15:48
Firefox Test Output
> tests_run(filter="renderer")
[1] "axis angle rotate"
[1] 0.75
[1] "One character value"
[1] "coord"
[1] "facet-coord"
[1] "facet lines"
[1] "facet_grid(space=\"free\")"
[1] "facet-trivial"
[1] "facet-strips"
@lazycipher
lazycipher / knit-print-output
Created June 6, 2020 13:23
knit-print-output
tests_run(filter = "knit")
[1] "knitting multiple animint plots in a single Rmd"
|.............. | 10%
ordinary text without R code
|............................ | 20%
label: safety (with options)
List of 1
$ echo: logi FALSE
tests_init("firefox")
Starting selenium binary. To shut it down, run:
remDr$closeWindow()
remDr$closeServer()
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
@lazycipher
lazycipher / output
Created May 28, 2020 21:48
Console Output Test
tests_run(filter = "renderer")
[1] "axis angle rotate"
[1] 0.75
[1] "One character value"
[1] "coord"
[1] "facet-coord"
[1] "facet lines"
[1] "facet_grid(space=\"free\")"
[1] "facet-trivial"
[1] "facet-strips"
@lazycipher
lazycipher / output
Created May 23, 2020 20:47
Output when Firefox used i.e tests_init("firefox")
tests_init("firefox")
Starting selenium binary. To shut it down, run:
remDr$closeWindow()
remDr$closeServer()
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
@lazycipher
lazycipher / output
Created May 23, 2020 20:46
Output when PhantomJS used i.e tests_init()
tests_init()
Starting phantomjs binary. To shut it down, run:
pJS$stop()
checking phantomjs versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
> tests_run(filter = "renderer")
[1] "axis angle rotate"
[1] 0.75