Skip to content

Instantly share code, notes, and snippets.

View Qasem-h's full-sized avatar
🏠
Working from home

Qasem Hajizadeh Qasem-h

🏠
Working from home
View GitHub Profile
@Qasem-h
Qasem-h / cat block
Last active August 29, 2015 14:19
Pic-block
<?php
global $count2, $block, $page_builder_id ;
$Cat_ID = $block['id'];
$rand = $offset = $order = $posts_num = '';
if( !empty($block['number']) )
$posts_num = $block['number'];
if( !empty($block['order']) )
@Qasem-h
Qasem-h / memcache_vs_redis.md
Created October 3, 2016 23:11 — forked from psahni/memcache_vs_redis.md
Comparison of memcache and redis [ Ruby on Rails ]

##Memcache

Memcache can be used for caching data in main memory using key value pair. So it reduces database load significantly. It is actually a storage engine used by Rack::Cache which is a middleware in Rails that provides HTTP caching. For example we can store a complex query result into a key

Rails.cache.fetch(key) do
  #......Processing
end
const Rooot = props => {
const requireSignIn = generateRequireSignInWrapper({
redirectPathIfNotSignedIn: <Home />
});
const { sports, currentLocale , currentUser } = props;
const routes = [
{
path: "/",
results: [
{
type: "MARKET",
COLUMN_NUMBER: "1",
DEFAULT_OPEN: "1",
ID: "1777",
NAME: "Fulltime ReSUCCESSlt",
ORDER: "0"
},
{
let data = { results: [
{
type: "EVENT",
CT: "Zimbabwe Premier Soccer League",
FI: "82829971",
FULL_TIME: "90",
MO: "0",
MP: "0",
MS: "0",
NAME: "Chicken Inn FC v Manica Diamonds FC"
{
"type": "MA",
"CN": "1",
"DO": "1",
"FF": "",
"FI": "0",
"IB": "0",
"ID": "1777",
"IM": "1",
"IR": "",
{
"type": "MA",
"CN": "1",
"DO": "1",
"FF": "",
"FI": "83004323",
"I2": "1",
"IB": "0",
"ID": "1777",
"IM": "1",
{
"type": "MA",
"CN": "3",
"DO": "1",
"FF": "",
"FI": "83025411",
"I2": "1,6",
"IB": "0",
"ID": "10124",
"IM": "1",
let data = {
results: [
{
type: "MA",
CN: "3",
DO: "1",
FF: "",
FI: "83025411",
I2: "1,6",
IB: "0",
import React, { useEffect, useRef, useState } from "react";
import { IFormError, IPaymentGatewayConfig } from "@types";
import { CompleteCheckout_checkoutComplete_order } from "@saleor/sdk/lib/mutations/gqlTypes/CompleteCheckout";
import { ErrorMessage } from "@components/atoms";
interface IResourceConfig {
src: string;
integrity: string;
crossOrigin: string;