Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Working remotely.

Omereshone Kelvin Oghenerhoro DominusKelvin

👨‍💻
Working remotely.
View GitHub Profile
View performance.mark-2.js
fn: async function(inputs, exits) {
console.time(‘waiting’)
var wavesNGNPrice = await sails.helpers.fetch('https://waves-africa-api.herokuapp.com/ngn');
console.timeEnd(‘waiting’)
exits.success(wavesNGNPrice)
}
@DominusKelvin
DominusKelvin / performance.mark.js
Created Nov 24, 2020
Code snippet for performance.mark
View performance.mark.js
fn: async function(inputs, exits) {
performance.mark(‘start waiting’)
var wavesNGNPrice = await sails.helpers.fetch('https://waves-africa-api.herokuapp.com/ngn');
performance.mark(‘end waiting’)
performance.mark(‘waiting period’, ‘start waiting’, ‘end waiting’)
exits.success(wavesNGNPrice)
}
@DominusKelvin
DominusKelvin / pg_dump_for_sails.md
Last active Oct 26, 2020
Get your local database to Heroku Postgres
View pg_dump_for_sails.md

Step 1: First check if the pg_dump utility is available:

pg_dump --version

Step 2: if it is, in your Sails project, run:

pg_dump -U DB_USER_NAME DB_NAME > dump.sql
@DominusKelvin
DominusKelvin / fixed-bluetooth-linux.md
Created Apr 7, 2020
Bluetooth device connected but not working
View fixed-bluetooth-linux.md

Just run

rfkill block bluetooth

Then run:

rfkill unblock bluetooth
@DominusKelvin
DominusKelvin / switch-windows-in-current-workspace-gnome.md
Last active Mar 20, 2020
Make Gnome switcher switch windows in current workspace
View switch-windows-in-current-workspace-gnome.md

Run the below command in terminal to make gnome switch between open windows in only the current workspace you are in:

gsettings set org.gnome.shell.app-switcher current-workspace-only true
@DominusKelvin
DominusKelvin / postman-update.sh
Created Mar 13, 2020 — forked from lira/postman-update.sh
Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
View postman-update.sh
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
View committing-with-vim.md

Committing With Vim - A step by step tip

So if you are like me, and you are not familiar with the editor Vim, but sometimes trigger the editor when you omit commit or tag messages, you can follow the below steps.

  1. Press i on your keyboard to enter insert mode,
  2. Type in your message(commit message or tag message)
  3. Press the esc or escape key to exit the insert mode of vim
  4. Then type :x to exit vim after saving your commit

Hope this helps

Happy deploying 🚀🚀🚀

View gist:0a4cce63bdb0ae61ffd38d5a5c224a83
Verifying my Blockstack ID is secured with the address 1NWnuhEhpKp9yRNJBnjm1GGkGz4UDgyW34 https://explorer.blockstack.org/address/1NWnuhEhpKp9yRNJBnjm1GGkGz4UDgyW34
View keybase.md

Keybase proof

I hereby claim:

  • I am dominuskelvin on github.

  • I am dominuskelvin (https://keybase.io/dominuskelvin) on keybase.

  • I have a public key ASDGCtysgcoZ4QcOEBJ5VuWu1Gg3N6e93ht1qtQtRZY24Qo

View data_schema.json
{
"id": 1,
"primary_contact_name": 'John Doe',
"primary_contact_number: 08102311012,
"primary_contact_email": 'kelvinomereshone@gmail.com',
"who_is_this_person": 'Landlord',
"lister_is_primary_contact": Yes,
"bank_details": {
"bank_name": 'First Bank',
"bank_account_number": "2034789056",
You can’t perform that action at this time.