Skip to content

Instantly share code, notes, and snippets.

View jattoabdul's full-sized avatar
ruling the world

Jatto Abdulqahhar jattoabdul

ruling the world
View GitHub Profile
View gist:1193ffe927073470832bdba1a81ba6f4
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\n",
"sources" : [ "" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "" ],
jattoabdul / africanTechPros.json
Last active May 19, 2020 22:32
A list of Popular African Tech Leaders
View africanTechPros.json
"name": "Abdulsamii Ajala",
"proPic": "/images/vuevocate.jpg",
"currentLocation": {
"city": "Ilorin",
"country": "Nigeria",
"countryCode": "NG"
"nationality": {
jattoabdul / subscriptions.html.erb
Created November 1, 2019 01:49
Write the code for app/views/admins/subscriptions.html.erb to display in a particular format while using bootstrap css framework in rails views
View subscriptions.html.erb
<div class="container-fluid">
<% @subscriptions.each do |subscription| %>
<div class="row">
<div class="col-md-8 col-sm-12 col-xs-12">
<%= mail_to "" %>
<div class="col-md-4 col-sm-12 col-xs-12">
<span><%= subscription.plan&.name %></span>
jattoabdul / noteable.rb
Last active May 13, 2019 21:36
Using Active Support Concerns
View noteable.rb
require 'activesupport/concern'
module Noteable
extend ActiveSupport::Concern
included do
has_many :notes, as: :noteable
def note_taking_action
jattoabdul / Ruby Rubocop Style guide
Created October 7, 2018 14:12
This should be in the .rubocop.yml file in the root of your rails app after installing and configuring rubocop
View Ruby Rubocop Style guide
- "vendor/**/*"
- "db/**/*"
- "tmp/**/*"
- "bin/**/*"
- "log/**/*"
- "config/**/*"
- "app/assets/**/*"
- "Rakefile"
View Javascript Style
  "root": true,
  "extends": "airbnb-base",
  "env": {
    "node": true,
    "es6": true,
    "mocha": true
 "rules": {
def __num_suffix(self, check_in_date):
Strip the date suffix and return the date
Before comparing the date
date_value = str(check_in_date).split(' ')
day_value = date_value[0][:-2]
date_value[0] = day_value
return ' '.join(date_value)
def __convert_to_date(self, date_string):
today =
if date_string == 'today':
return today
elif date_string == 'yesterday':
return today - timedelta(days=1)
elif date_string == 'tomorrow':
return today + timedelta(days=1)
return today
def my_tasks(self):
email = self.user_info['user']['profile']['email']
recipient = self.user_info['user']['id']
task_cells = list(filter(lambda x: x['Email Address'] == email, self.sheet))
for index, row in enumerate(task_cells):
text_detail = (
'*Task #{} for {}:* \n\n'
'*Hey {},* Today is the check-in day for your writeup titled\n'
'Whats the status of the article?\n'
def help(self):
Return the Available commands in the system and their usage format
return {
'text': 'Available Commands: \n `/ranti my-task e.g. /ranti my-task` \n To get task assigned to you.\n'
' \n `/ranti show-task [date]{dth-month-year} e.g. /ranti show-task 5th-june-2018` \n Show all tasks for a particular date \n'
'\n `/ranti show-task [today] e.g. /ranti show-task today` \n Show all tasks for today \n'
'\n `/ranti show-task [tomorrow] e.g. /ranti show-task tomorrow` \n Show all tasks for tomorrow \n'
'\n `/ranti help` \n This help information \n \n Ranti Ver: 1.0'}