Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
dimkir / net_pres.c
Created Apr 1, 2020
net_pres.c sample
View net_pres.c
#include "../net_pres.h"
#include "../net_pres_encryptionproviderapi.h"
#include "../net_pres_socketapi.h"
#include "../net_pres_transportapi.h"
#include "net_pres_local.h"
#include "string.h"
//#define NULL '\0'
NET_PRES_InternalData sNetPresData;
dimkir / queue.js
Created Dec 12, 2019
Simple Queue Implemenation in JS
View queue.js
// --------
// --------
const q = queue({
onJobComplete: ({alias, result})=>{
console.log(`Completed job ${alias} with result: `, result);
onJobFail: ({alias, error})=>{
console.error(`Job ${alias} had error: `, error);
dimkir / stopwords.js
Created Jan 10, 2019
Some stopwords from the current tokenizer
View stopwords.js
'use strict';
const system = [
dimkir / atom-amd64.deb.log
Created Dec 7, 2017
Github Releases Headers
View atom-amd64.deb.log
curl -I
HTTP/1.1 302 Found
Date: Thu, 07 Dec 2017 14:51:51 GMT
Content-Type: text/html; charset=utf-8
Status: 302 Found
Cache-Control: no-cache
Vary: X-PJAX
dimkir / load-sheetsu-com.js
Last active Nov 17, 2017
Sheetsu Load Modifications
View load-sheetsu-com.js
var utils = {
startsWith : function (s, e, t) {
return t = t || 0, s.indexOf(e, t) === t
function callable__TriggerSheetsu_Request_and_Attach_EventDataReceived(element_with_sheetsu_attr) {
var el = element_with_sheetsu_attr;
dimkir / index.js
Created Mar 13, 2017
Using NigthmareJS on AWS Lambda
View index.js
'use strict';
// Code in global scope (outside of event) runs once, when container is first created
var pack = require('./lib/nightmare-lambda-pack');
var electronPath = pack.installNightmare(); // this will install the electron on the Lambda
var Xvfb = require('./lib/xvfb');
dimkir /
Created Mar 7, 2017
Tool for building dependencies for electron on Amazon Linux (and maybe on CentOS / RHEL)
dimkir / nightmare-on-amazon-linux.MD
Last active Feb 6, 2021
How to run nightmare on Amazon Linux
View nightmare-on-amazon-linux.MD

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
View gist:eb46a7e57a389ac9d2cdbc2762abfdf3
use Respect\Validation\Validator as v;
* @throws \Respect\Validation\Exceptions\ValidationException (actually superclass of \InvalidArgumentException)
function createUserEntity($username, $firstName, $lastName, $age, $heightCm, $married, $email, $comment){
dimkir / CategoryRepository2.php
Last active Feb 4, 2016
Two queries to fetch Category and sliced relationship
View CategoryRepository2.php
namespace AppBundle\Repository;
use AppBundle\Entity\Category;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;