Skip to content

Instantly share code, notes, and snippets.

@razarahil
razarahil / gist:6a96f2cdc52b06848956fda30c68bd04
Created January 10, 2022 08:03
Wordpress Nginx PHP-FPM
server {
listen 80;
listen [::]:80;
root /var/www/html/naturewoodsschool.com;
index index.php index.html index.htm index.nginx-debian.html;
server_name naturewoodsschool.com www.naturewoodsschool.com;
access_log off;
log_not_found off;
@razarahil
razarahil / html-meta-tags.md
Last active November 21, 2020 20:09
Basic HTML Meta Tags

List of Basic HTML Meta Tags You should use for SEO & Social Media

<meta charset='UTF-8'>

<meta name='copyright' content='company name'>

<meta name='language' content='ES'>
<appSettings>
<!– Pay U Money –>
<add key=”MERCHANT_KEY” value=”fB7m8s”/>
<add key=”SALT” value=”eRis5Chv”/>
<add key=”PAYU_BASE_URL” value=”https://test.payu.in/_payment”/>
<add key=”action” value=””/>
<add key=”hashSequence” value=”key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10″/>
</appSettings>
public void PayNow()
{
//initialize
tokenContext.setPaymentMessageSession(null);
ViewData["PaymentMessage"] = null;
EMedical.DataModel.UserLabTest labTest = tokenContext.getCurrentUserTest();
if (labTest != null)
{
string firstName = labTest.PatientName;
string amount = labTest.PayablePrice.ToString();
@razarahil
razarahil / Basic .htaccess file
Last active March 11, 2016 12:54
Must have .htaccess file for any website. This .htaccess includes non-www URL to www, Gzip compression & Cache.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [L,R=301]
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
@razarahil
razarahil / 0_reuse_code.js
Created December 8, 2013 04:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@razarahil
razarahil / JSONParser Main Volley
Last active December 20, 2015 14:49
MainActivity of Parsing JSON with Volley
package com.razzil.volleyjson;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
@razarahil
razarahil / ScaleFadePageTransformer.java
Created December 10, 2012 18:18 — forked from jgilfelt/ScaleFadePageTransformer.java
An ICS+ app/widget drawer style PageTransformer for your ViewPager
/***
* Copyright (c) 2012 readyState Software Ltd
*
* 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
* http://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,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@razarahil
razarahil / MainActivity.java
Created June 25, 2012 15:45 — forked from romannurik/SwipeDismissListViewTouchListener.java
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
// THIS IS A BETA! I DON'T RECOMMEND USING IT IN PRODUCTION CODE JUST YET
/*
* Copyright 2012 Roman Nurik
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
@razarahil
razarahil / class.C2DMParallel.php
Created June 3, 2012 20:31 — forked from mhlipson/class.C2DMParallel.php
Call C2DM in parallel using PHP
<?php
/*
class.C2DMParallel.php
PHP Class to send single messages to multiple devices
using Google's C2DM service.
*/
class C2DMParallel{