Skip to content

Instantly share code, notes, and snippets.

View codersaiful's full-sized avatar

Saiful Islam codersaiful

View GitHub Profile
@codersaiful
codersaiful / AndroidManifest.xml
Last active September 14, 2017 17:12
My First Android App
package com.saiful.hello;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@codersaiful
codersaiful / MainActivity.java
Created September 15, 2017 17:49
Creating Main Activity.java
package com.code.practice;
import android.support.annotation.IdRes;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
Button go_to_class;
@codersaiful
codersaiful / getDirDetails.php
Created December 30, 2017 16:05
Getting Directory Details Sultuion
<?php
/**
* Getting Details from a Directory.
* Project is coded by Saiful Islam.
*
* @author Saiful Islam <[email protected]>
* @package Saiful Script
* @link http://fb.com/codersaiful Saiful Islam Facebook Profile link.
*/
@codersaiful
codersaiful / bangla_font_issue_solution.php
Created January 6, 2018 10:37
Bangla Font issue Solution
<?php
Class Database {
public $host = DB_HOST;
public $user = DB_USER;
public $pass = DB_PASS;
public $dbname = DB_NAME;
public $link;
public $error;
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
});
</script>
</head>
/*
* Only for Fronend Section
* @since 1.0.0
*/
(function($) {
$(document).ready(function() {
$('body').on('click', '.wpt_product_table_wrapper .wpt_thumbnails img', function() {
/*
* Only for Fronend Section
* @since 1.0.0
*/
(function($) {
$(document).ready(function() {
$('.wpt_product_table_wrapper .wpt_thumbnails img').click(function() {
@codersaiful
codersaiful / gist:3191b4bbe41e857bbba04e09e8433b16
Created June 3, 2018 05:46 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

<?php
$cat_number = 2; //Sepcify your category ID here
$your_catname = get_cat_name( $cat_number );
//You can display your cat as your style
$args = array(
//All other here
'cat' => $cat_number,