Skip to content

Instantly share code, notes, and snippets.

View AdamSaleh's full-sized avatar

Adam Saleh AdamSaleh

View GitHub Profile
~/hello-world-apb git:test_experiment ❯❯❯ apb test ⏎ ✱
Unable to find image 'docker.io/ansibleplaybookbundle/apb-tools:latest' locally
Trying to pull repository docker.io/ansibleplaybookbundle/apb-tools ...
sha256:acf8af1951c049e60a7e2c6751579ee3d896678fe0b8be5ca163325cbe9d7985: Pulling from docker.io/ansibleplaybookbundle/apb-tools
74f0853ba93b: Already exists
4822b694b6eb: Pull complete
0829f6d34033: Pull complete
ff826eedc541: Pull complete
c236409ac31f: Pull complete
Digest: sha256:acf8af1951c049e60a7e2c6751579ee3d896678fe0b8be5ca163325cbe9d7985
FROM docker.io/fhwendy/jenkins-slave-base-centos7:latest
MAINTAINER Paul McCarthy <[email protected]>
ENV PATH=$PATH:/usr/local/go/bin:/workspace/bin
ENV GOPATH=/workspace/
ENV [email protected]
ENV GIT_COMMITTER_NAME=asaleh
USER root
class SemigroupJoinRecord rl rl2 row row' row''
| rl -> row, rl2 -> row', rl rl2 -> row''
where
appendJoinRecordImpl :: RLProxy rl -> RLProxy rl2 -> Record row -> Record row' -> Record row''
instance appendJoinRecordCons ::
( IsSymbol name
, Semigroup ty
, RowCons name ty trash row
, SemigroupJoinRecord tail other' row row' tailRow''
@AdamSaleh
AdamSaleh / test.js
Created November 14, 2017 16:25
purescriptStreamToAff
'use strict';
exports._collapseStream = function (stream) { // accepts a request
return function (onError, onSuccess) { // and callbacks
var buffer = '';
stream.on('data', (d) => { buffer = buffer + d; });
stream.on('err', (err) => onError(err));
stream.on('end', () => onSuccess(buffer));
// Return a canceler, which is just another Aff effect.
const PouchDB = require('pouchdb');
const db = new PouchDB('./database');
const express = require('express');
const app = express();
const router = express.Router();
app.use('/locker', router);
app.listen(8800, function () {
console.log('Listening at http://localhost:8800/locker');
});
const PouchDB = require('pouchdb');
const db = new PouchDB('./database');
const express = require('express');
const app = express();
const router = express.Router();
app.use('/locker', router);
app.listen(8800, function () {
console.log('Listening at http://localhost:8800/locker');
});
const yargs = require('yargs');
const Configstore = require('configstore');
const request = require('request-promise');
const fs = require('fs');
let jsonRequest = request.defaults({
json: true
});
const argv = yargs.usage('$0 <cmd> [args]')
@AdamSaleh
AdamSaleh / Setup.md
Last active September 6, 2017 07:00

Development setup for the nodejs workshop

My asumptions about your current setup are, that you currently don't have Node installed, and you have no strong preferences for the way you want to have it installed.

If you do, to participate in the course you should have on your machine

  • working Node 8.x
  • latest Visual Studio Code (because it has good integration for node debugging)
module Main where
import Prelude
import Data.Array ((..))
import Data.Foldable (for_)
import Control.MonadPlus (guard)
import Control.Monad.Eff.Console (logShow)
import Data.Functor (class Functor)
import Control.Monad.Free (Free, liftF)
# http://mullr.github.io/micrologic/literate.html translated to python
# Variables themselves are represented as vectors that hold
# their variable index. Variable equality is determined by coincidence
# of indices in vectors.
class LVar:
def __init__(self, uid):
self.uid = uid
def __hash__(self):