Skip to content

Instantly share code, notes, and snippets.

🇨🇦

Roman moltar

🇨🇦
Block or report user

Report or block moltar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@moltar
moltar / keybase.md
Created Jun 29, 2019
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am moltar on github.
  • I am m0ltar (https://keybase.io/m0ltar) on keybase.
  • I have a public key ASDLvYBxhyuKFzV36gxSdrS39t-KbM6KiCjaXBSL5L_xwAo

To claim this, I am signing this object:

View Untitled-1.js
module.exports = async function pdf(url, req) {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto(
'https://.....c9users.io/clients/' +
req.params.id +
'/reports/monthlyreport/' +
req.params.marketplace +
'/' +
View aorb.ts
interface A {
foo: number
}
interface B {
bar: number
}
type C = A | B
View test.ts
class A {
get a() {
return 1
}
}
class B {
get b() {
return 2
}
}
@moltar
moltar / bull.js
Created Jun 20, 2018
Assure bull only runs a single instance of a job
View bull.js
global.Promise = require('bluebird')
const Queue = require('bull')
const EventEmitter = require('events')
const JOB_NAME = 'testJob'
const PROGRESS_BUS_EVENT_NAME = 'progress'
const COMPLETED_PROGRESS_VALUE = 100
const { log } = console
View bootstrapVue.js
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved */
import Vue from 'vue'
import {
Layout, Modal, Button, FormGroup, FormInput,
FormTextarea, InputGroup, Jumbotron, Collapse, Card,
Tabs, Popover, Badge
} from 'bootstrap-vue/es/components'
Vue.use(Layout)
View 01_order.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moltar
moltar / shortid.js
Created Mar 20, 2018
duid conflict
View shortid.js
const duid = require('short-duid')
const inst = duid.init({
shardId: 1,
salt: 'foo',
epochStart: 1517363935892
})
for (let i = 0; i < 100000; i += 1) {
const ids = inst.getDUIDInt(1)
@moltar
moltar / PayKickStart.js
Created Sep 11, 2017
PayKickStart IPN POST Checksum Verification in JavaScript
View PayKickStart.js
function verifyChecksum (params, secret) {
const valuesArray = Object
.keys(params)
.filter((key) => key && params[key] && key !== 'verification_code')
.map((key) => params[key])
const valuesObject = {}
for (let i = 0; i < valuesArray.length; i++) {
// stringify indexes for ASCII sort
valuesObject[i.toString()] = valuesArray[i]
View test2.html
asdasd
new trhing
update gist
asdasd
new line
You can’t perform that action at this time.