Skip to content

Instantly share code, notes, and snippets.

View foysalit's full-sized avatar
🎯
Focusing

Foysal Ahamed foysalit

🎯
Focusing
View GitHub Profile
@foysalit
foysalit / adding the nano scroller
Created April 11, 2013 21:13
steps I followed while adding the nano scroller in the 4dem gestliste app.
put the plugin code in the plugin.js
https://raw.github.com/jamesflorentino/nanoScrollerJS/master/bin/javascripts/jquery.nanoscroller.min.js
put the styling in the plugin.css
https://raw.github.com/jamesflorentino/nanoScrollerJS/master/bin/css/nanoscroller.css
views/search/index.php ->
<div class="result-wrapper nano">
<div class="content">
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char date[10] = "10/02/2012";
char day[10];
char month[10];
char year[10];
@foysalit
foysalit / gist:5818950
Created June 19, 2013 23:11
hack the woocommerce ajax reload of the order review.
remove_action('woocommerce_checkout_order_review', 'woocommerce_order_review');
add_action('woocommerce_checkout_order_review', 'cu_pr_update_order_review', 10);
function cu_pr_update_order_review() {
ob_start();
global $woocommerce;
woocommerce_get_template( 'checkout/review-order.php', array( 'checkout' => $woocommerce->checkout() ) );
$table = ob_get_contents();
@foysalit
foysalit / soonest travel finder for polash
Created July 4, 2013 12:49
finding latest destination script in c.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int i, distance, cost = 0;
char destination[20], type, line[100], max_line[100];
char date[10];
int match = 0;
@foysalit
foysalit / custom field for wp nav menu
Created July 11, 2013 22:41
Adding custom field in the wordpress nav menu items. and displaying the field values using a custom walker class.
/**
* Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
* @author Weston Ruter (@westonruter), X-Team
* direct link to the gist - https://gist.github.com/kucrut/3804376
*/
add_action( 'init', array( 'XTeam_Nav_Menu_Item_Custom_Fields', 'setup' ) );
class XTeam_Nav_Menu_Item_Custom_Fields {
static $options = array(
@foysalit
foysalit / gist:6870708
Created October 7, 2013 16:23
modifying the editor in 4dem.

#edited the "new theme"

-iguana.js ->474 ->432 ->46

-jquery.js

-/layouts/user_email_content_builder_header2.php

@foysalit
foysalit / info.md
Created November 6, 2013 23:55
c struct and pointer
@foysalit
foysalit / dashboard_functions.php
Last active February 12, 2017 05:36
bdgeeks wp dashboard extension
<?php
/**
* class to customize dashboard of users
*/
class CFA_dashboard{
public $user_data;
public $username;
public function __construct()
{
@foysalit
foysalit / Company.php
Last active August 29, 2015 14:16
query eloquent relation
public function users()
{
return $this->hasMany('App\User');
}
public function tasks()
{
return $this->hasMany('App\Task');
}
@foysalit
foysalit / tpl.js
Last active November 29, 2015 14:18
meteor template level subscription
function showSpinner() {
console.log('showing spinner');
}
function hideSpinner() {
console.log('hiding spinner');
}
Template.Tpl.onRendered(function(){
showSpinner();