Skip to content

Instantly share code, notes, and snippets.

View MFQ's full-sized avatar
🎯
Focusing

Muhammad Fazil Qureshi MFQ

🎯
Focusing
View GitHub Profile
@MFQ
MFQ / Node
Created December 3, 2016 15:06
class Node
attr_accessor :next, :data
def initialize
@next = nil
@data = nil
end
def initialize(d)
@data = d
@MFQ
MFQ / Node
Created December 3, 2016 15:06
class Node
attr_accessor :next, :data
def initialize
@next = nil
@data = nil
end
def initialize(d)
@data = d
def flattern(array, main_array, index)
while( index < array.length)
if(array[index].class == Array)
flattern(array[index], main_array, 0)
else
main_array.push(array[index])
end
index = index + 1
end
main_array
@MFQ
MFQ / MaxPayue
Last active June 25, 2016 19:57
require "byebug"
def fetch_values(str)
keys=str.scan(/\w*\s+(?=\=)|\w*+(?=>\=)/)
values = str.scan(/(?<=")\w+(?=")/)
root_key=str.scan(/(?<=^<)+\w*/)
h={}
keys.each_with_index { |key, index| h[key.strip!] = values[index] }
h
end
<Invitation:0x00000009851228
id: 65,
email: "[email protected]",
group_public_key_encrypted: "",
organization_id: 27,
group_id: nil,
inviter_id: 10,
created_at: Fri, 08 Jan 2016 13:39:55 UTC +00:00,
updated_at: Fri, 08 Jan 2016 13:39:55 UTC +00:00,
is_a_new_user: false,
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@MFQ
MFQ / gist:a308a8f05bb87b78c756
Created April 2, 2015 21:55
Mobile-config.js for meteor
App.info({
name: 'Todos',
description: 'A simple todo list app built in Meteor.',
author: 'Percolate Studio Team',
email: '[email protected]',
website: 'http://percolatestudio.com',
version: '0.0.1'
});
App.icons({
<template name="mobileLayout">
{{#ionBody}}
{{#ionSideMenuContainer side="left" }}
{{#ionSideMenus}}
{{#ionSideMenu}}
<div class="bar bar-header bar-dark">
<h1 class="title">iRotation</h1>
country_league_bowlers GET /countries/:country_id/leagues/:league_id/bowlers(.:format) bowlers#index
country_league_bowler GET /countries/:country_id/leagues/:league_id/bowlers/:id(.:format) bowlers#show
country_league_batsmen GET /countries/:country_id/leagues/:league_id/batsmen(.:format) batsmen#index
country_league_batsman GET /countries/:country_id/leagues/:league_id/batsmen/:id(.:format) batsmen#show
country_leagues GET /countries/:country_id/leagues(.:format) leagues#index
country_league GET /countries/:country_id/leagues/:id(.:format) leagues#show
countries GET /countries(.:format) countries#index
country GET /countries/:id(.:format) countries#show
HTTP/1.1 200 OK
Content-Language:
en
Cache-control:
no-cache, must-revalidate
Fitbit-Rate-Limit-Limit:
150
Content-Length:
618
Expires: