Skip to content

Instantly share code, notes, and snippets.

View alFReD-NSH's full-sized avatar

Farid Nouri Neshat alFReD-NSH

View GitHub Profile
@alFReD-NSH
alFReD-NSH / Dockerfile
Created November 15, 2019 16:29
Tezos Docker Build
################################
### Builder image
################################
FROM ubuntu:18.04 as builder
ENV VERSION=mainnet \
OPAM_VERSION=2.0.4
RUN apt update
RUN apt install -y \
@alFReD-NSH
alFReD-NSH / Dockerfile
Created November 15, 2019 16:29
Tezos Docker Build
################################
### Builder image
################################
FROM ubuntu:18.04 as builder
ENV VERSION=mainnet \
OPAM_VERSION=2.0.4
RUN apt update
RUN apt install -y \
@alFReD-NSH
alFReD-NSH / accounts.txt
Last active November 4, 2019 23:31
Updated accounts in tezos babylon 5 upgrade
KT1DUfaMfTRZZkvZAYQT5b3byXnvqoAykc43
tz1KeD5d7AwhiHkQiRhtnWgJuEawe5Fnp5E3
tz1KeK8qEnZhFzLQqnz2oKaXnG4X2zQC5tz3
tz1KeZ1qgZvoB2CedksgbfnXpiZbQMaNpQ5b
tz1KemUFwq2fQ77Sdo7M3BbTuJ9W2nJ7nyFk
tz1KfbCaW7zubFT62BsAtdRezrXbwPYeHahf
tz1KfiqVDAjJSEmRPSAb4sEvCYqggpBgrmZi
tz1KfohHYAmQFGNJXzKaYzFrJgJ6Q1V9oKm2
tz1KfpD7KWY4eYAJdLSJY8gsHC8YZPyfshY3
tz1KfsDBnFLs7Z6DvoLLckrRvcz6ZHQcfPbG
@alFReD-NSH
alFReD-NSH / loopback-db-migrate.js
Created March 8, 2016 03:02
For those using loopback and changing their database from one to another. This will copy all the data from the given database to the configured database(in server/datasources). This was tested to copy from postgresql to mongodb.
'use strict';
let app = require('../server/server');
let loopback = require('loopback');
let prompt = require('prompt');
console.log(`This will copy all the data from the given database to the
configured database(in server/datasources)`)
prompt.get(['connector', 'url'], (err, result) => {
@alFReD-NSH
alFReD-NSH / test not passing on master and v0.10
Created February 13, 2014 00:58
Node tests not passing on v0.10 and master branches on my ubuntu 13.04 64bit machine.
=== release test-http-dns-error ===
Path: simple/test-http-dns-error
assert.js:92
throw new assert.AssertionError({
^
AssertionError: "EADDRINFO" == "ENOTFOUND"
at ClientRequest.<anonymous> (/home/alfred/repos/node/test/simple/test-http-dns-error.js:49:12)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at CleartextStream.socketErrorListener (http.js:1547:9)
at CleartextStream.EventEmitter.emit (events.js:95:17)
@alFReD-NSH
alFReD-NSH / s3-get-with-error.js
Created January 18, 2014 11:06
Here's a simple test for an issue in aws2js. The test doesn't pass
'use strict';
var common = require('./includes/common.js');
var assert = require('assert');
var s3 = require('../').load('s3');
var fs = require('fs');
function wrap(name) {
var fn = fs[name];
wrap[name] = 0;
@alFReD-NSH
alFReD-NSH / Second run
Last active January 3, 2016 16:19
I have already set AWS_ACCEESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS2JS_S3_BUCKET.
> aws2js@0.8.3 test /home/alfred/repos/aws2js
> tools/test.sh
Running tests on node.js v0.10.13
[72% | 34/47 | + 33 | - 0] s3-signurl
assert.js:324
assert.ifError = function(err) { if (err) {throw err;}};
^
Error: Redirect response without the Location header.
at Object.formattedError (/home/alfred/repos/aws2js/node_modules/http-get/lib/tools.js:251:9)
@alFReD-NSH
alFReD-NSH / popover.js
Created December 8, 2013 09:54
Close popover when the body is clicked on, while using bootstrap popover.
var path = '#thePopoverContent',
element = $('#theButtonThatOpensThePopover')[0];
$(document).click(function (e) {
if (this !== element &&
e.target !== element &&
$('.popover').length &&
!$(e.target).parents(path).length) {
hide();
@alFReD-NSH
alFReD-NSH / bench.js
Created February 20, 2013 09:16
Sugar multi match benchmark
var Benchmark = require('benchmark');
var suite = new Benchmark.Suite;
require('./release/sugar-full.development');
var empty = [];
var with500 = [];
500..times(function () {
with500.push({});
@alFReD-NSH
alFReD-NSH / bench.html
Created February 15, 2013 05:15
Knockout observable benchmark. Put the file in your knockout folder.
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
</head>
<body>
<script type="text/javascript" src="build/output/knockout-latest.js"></script>
<script type="text/javascript" src="https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js"></script>