Skip to content

Instantly share code, notes, and snippets.


Chidume Nnamdi philipszdavido

View GitHub Profile
philipszdavido / README.txt
Created Nov 6, 2021
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View README.txt
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
View custom_proxy.dart
import 'dart:io';
import 'package:flutter/foundation.dart';
/// Allows you to set and enable a proxy for your app
class CustomProxy {
/// A string representing an IP address for the proxy server
final String ipAddress;
/// The port number for the proxy server
/// Can be null if port is default.
philipszdavido / erc20-token-sample.sol
Created Jan 24, 2021 — forked from bajcmartinez/erc20-token-sample.sol
Necessary code to generate an ERC20 Token
View erc20-token-sample.sol
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe

Ways to debounce Http requests in Angular

Debouncing is the delay of a function/method execution or an action for a period of the specified time. During this specified time, calls to the method/function or action are collected and executes each one when the specified has elapsed.

Suppose you have a blog website with a search bar where users can search for posts. When a user types in the name of a blog to search in the search bar, an HTTP request is sent to the web API to search for blog post names or mentions with the search tokens.

You will find out that the server will always be called on every single letter typed. For example, you want articles based on "Javascript" and "optimization", then you typed "Javascript optimization". For every single letter in "Javascript optimization", the server will be called plus space, i.e the server will be called 23 times just to search for blog posts with "Javascript optimization" keywords and *ngFor will trigger change detection run on the component 10 times.

The c

View node_evt_loop.js
let timers = [] // eg. setTimeout(...), setInterval(...)
let pending_callbacks = []
let idle = [] // eg. requestIdleCallback(...)
let prepare = []
let poll = [] //eg. HTTP conns, Socket conns, file ops
let check = [] // eg. setImmediate(...)
let close = [] // eg. socket.on('close',()=>{...})
let exit=[]
const log = console.log

Title: 16 useful NPM packages to use in Node.js + Express apps.

  • Introduction

  • What is Node.js?

  • What is NPM (Node Package Manager)?

  • What is Express?

  • What NPM packages will we use

  • App We will build

  • Server setup

    1. express: creating our server


TensorFlow is an open source software library created by Google that is used to implement machine learning and deep learning systems. These two names contain a series of powerful algorithms that share a common challenge — to allow a computer to learn how to automatically spot complex patterns and/or to make best possible decisions.

**TensorFlow: a modern machine learning library **

TensorFlow, open sourced to the public by Google in November 2015, is the result of years of lessons learned from creating and using its predecessor, DistBelief. It was made to be flexible, efficient, extensible, and portable. Computers of any shape and size can run it, from smartphones all the way up to huge computing clusters. It comes with lightweight software that can instantly productionize your trained model, effectively eliminating the need to reimplement models.

TensorFlow embraces the innovation and community engagement o f open source, but has the support, guidance, and stability of a large

View color-log.js
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
philipszdavido /
Created Jan 4, 2018 — forked from mixonic/
Services for Glimmer.js


In config/environment.js:

// config/environment.js
'use strict';

 * Mostly this is the stock module config.
philipszdavido / class_decorator.ts
Created Jan 3, 2018 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
View class_decorator.ts
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);