Skip to content

Instantly share code, notes, and snippets.

View jerryOkafor's full-sized avatar

Jerry Hanks Okafor jerryOkafor

View GitHub Profile
@jerryOkafor
jerryOkafor / kannel.conf
Created February 20, 2021 21:15 — forked from srugano/kannel.conf
Example of Kannel configurations to be used with a Huawei modem.
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
# 3) read the user guide
@jerryOkafor
jerryOkafor / publickey-git-error.markdown
Created November 20, 2020 20:15 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@jerryOkafor
jerryOkafor / tts.sh
Created November 17, 2020 19:37 — forked from andrius/tts.sh
Quick and dirty IVR sounds for your Asterisk PBX
#!/bin/bash
#title : tts.sh
#description : This script will convert text to speech using Google translate API
# and then to Asterisk formats (wav, sln, gsm)
#
#author : Andrius Kairiukstis <k@andrius.mobi>
#date : 26 July 2013
#version : 0.1
#usage : bash tts.sh FILENAME VOICE PHRASE
@jerryOkafor
jerryOkafor / Turnstile.kt
Created August 12, 2020 12:32 — forked from cdmunoz/Turnstile.kt
Turnstile hackerrank's problem solution
fun getTimes(times: Array<Int>, directions: Array<Int>): Array<Int> {
val result: Array<Int> = Array(times.size) { 0 }
val endTime: Int = times.max() ?: 0
if (endTime == 0) return result
val inQueue: Queue<Int> = LinkedList()
val outQueue: Queue<Int> = LinkedList()
var currentIndex = 0
var turnstile = 0
package velasolutions.velabank.services
import android.accessibilityservice.AccessibilityService
import android.accessibilityservice.AccessibilityServiceInfo
import android.content.Context
import android.graphics.PixelFormat
import android.os.Build
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
/**
* Data class that is necessary for a UI to show a listing and interact w/ the rest of the system
*/
data class Listing<T>(
// the LiveData of paged lists for the UI to observe
val pagedList: LiveData<PagedList<T>>,
// represents the network request status to show to the user
val networkState: LiveData<NetworkState>,
// represents the refresh status to show to the user. Separate from networkState, this
// value is importantly only when refresh is requested.
@jerryOkafor
jerryOkafor / proguard-rules.pro
Created February 18, 2018 19:11 — forked from jemshit/proguard-rules.pro
Proguard rules for common Android libraries
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9)
-keep class rx.schedulers.Schedulers {
public static <methods>;
@jerryOkafor
jerryOkafor / firesheetz.ts
Created December 12, 2017 16:19 — forked from CodingDoug/README.md
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions
// Copyright 2017 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,