Skip to content

Instantly share code, notes, and snippets.

View sachinkiranti's full-sized avatar
:octocat:
Focusing

Sachin Rai sachinkiranti

:octocat:
Focusing
View GitHub Profile
@sachinkiranti
sachinkiranti / searchform.php
Last active February 28, 2018 08:55
Search form snippets for wordpress
<?php
/**
*
* Search form snippets for wordpress
* Article : https://raisachin.wordpress.com/2018/02/20/customize-the-search-form-as-you-want-in-wordpress/
* Article : https://raisachin.com.np/customize-search-form-want-wordpress/
*
*/
?>
@sachinkiranti
sachinkiranti / wp-config.php
Last active February 20, 2018 18:57
Turn on error reporting in wordpress ...
<?php
//https://raisachin.wordpress.com/2018/01/30/how-to-turn-on-error-reporting-in-wordpress/
define('WP_DEBUG', true); // update false to true
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
@sachinkiranti
sachinkiranti / laravel.gitignore
Last active February 22, 2018 18:46
Laravel gitignore helper
vendor/
node_modules/
npm-debug.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
@sachinkiranti
sachinkiranti / wordpress.gitignore
Created February 22, 2018 02:01
Wordpress gitignore helper file
*.log
wp-config.php
wp-content/advanced-cache.php
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
wp-content/mu-plugins/
@sachinkiranti
sachinkiranti / hbl.php
Last active December 26, 2021 04:33
Himalayan Bank Payment Gateway
<?php
/**
*
* Himalayan Bank Payment Gateway
* Prod endpoint : https://hblpgw.2c2p.com/HBLPGW/Payment/Payment/Payment
* Dev endpoint : https://hbl.pgw/payment
*
* HTTP status code :
*
* 00 Approved ,transaction is successfully paid.
@sachinkiranti
sachinkiranti / gist:6f6eeca9e795868c2e810c7659dd7765
Created February 28, 2018 15:30 — forked from henriquemoody/http-status-codes.php
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
**/
return array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing', // WebDAV; RFC 2518
200 => 'OK',
@sachinkiranti
sachinkiranti / socket-cheatsheet.js
Last active March 9, 2018 12:22 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@sachinkiranti
sachinkiranti / easyformhelper.js
Last active September 11, 2018 04:59
Simple Form Helper to get form data
/**
* Project: Easy Form Helper
* Description: Simple Form Helper to get form data
* Author: Raisachin, https://raisachin.com.np
* Licence: MIT License http://opensource.org/licenses/mit-license.php
* Version: 1.0.0
*
* Usage:
* @type url/data : url = get url & data = object of form data
* @strict : if true , filter empty form data & if false will get all the form data
@sachinkiranti
sachinkiranti / helpers.php
Last active August 15, 2018 03:32
Laravel Useful helpers
<?php
if (! function_exists('change_db_storage')) :
/**
* Changing all tables database storage
* i.e InnoDB/MyISAM
*/
function change_db_storage( $storage = 'InnoDB' ) {