Skip to content

Instantly share code, notes, and snippets.

require 'faraday'
require 'json'
require 'pry'
class UserCommits
def initialize(username)
@username = username
end
def github_url
require 'faraday'
require 'json'
require 'pry'
class ReceivedEvent
def initialize(username)
@username = username
end
def github_url
require 'faraday'
require 'json'
require 'pry'
class RepoIssue
def initialize(username)
@username = username
end
def github_url
require 'rest-client'
require 'json'
class Wave
def initialize(flutterwave_api_key, flutterwave_api_secret)
@url = "https://moneywave.herokuapp.com"
@flutterwave_api_key = flutterwave_api_key
@flutterwave_api_secret = flutterwave_api_secret
end
@kinsomicrote
kinsomicrote / HOC.js
Created March 2, 2018 03:53 — forked from Restuta/HOC.js
React HOC (Higher Order Component) Example
/* HOC fundamentally is just a function that accepts a Component and returns a Component:
(component) => {return componentOnSteroids; } or just component => componentOnSteroids;
Let's assume we want to wrap our components in another component that is used for debugging purposes,
it just wraps them in a DIV with "debug class on it".
Below ComponentToDebug is a React component.
*/
//HOC using Class
//it's a function that accepts ComponentToDebug and implicitly returns a Class
let DebugComponent = ComponentToDebug => class extends Component {
alias ga.="git add ."
alias gc="git commit -m"
alias gpush="git push"
alias gb="git branch"
alias gck="git checkout"
alias gst="git status"
alias gpull="git pull origin"
@kinsomicrote
kinsomicrote / ngrok-installation.md
Created October 24, 2019 15:39 — forked from wosephjeber/ngrok-installation.md
Installing ngrok on Mac

Installing ngrok on OSX

brew cask install ngrok

Using ngrok

The easiest way to use ngrok to tunnel into your localhost is if your local project is running on a specific port (e.g. not using named vhosts). You just run ngrok http [port number].

You can quickly boot up a local webserver using ruby. cd into the project's root directory and run ruby -run -e httpd . -p [port number].

# frozen_string_literal: true
Doorkeeper.configure do
# Change the ORM that doorkeeper will use (requires ORM extensions installed).
# Check the list of supported ORMs here: https://github.com/doorkeeper-gem/doorkeeper#orms
orm :active_record
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
#raise "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}"
@kinsomicrote
kinsomicrote / rails http status codes
Created November 18, 2019 19:14 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
require 'httparty'
class TransactionsController < ApplicationController
def paystack
@order = Order.find_by(ref_no: params[:ref])
amount = @order.price
ref = @order.ref_no