Skip to content

Instantly share code, notes, and snippets.

View tysonchamp's full-sized avatar
:octocat:
Nerd

Soumya Mondal tysonchamp

:octocat:
Nerd
View GitHub Profile
[select country2 "Aruba" "Afghanistan" "Angola" "Albania" "Andorra" "United Arab Emirates" "Argentina" "Armenia" "American Samoa" "Antigua and Barbuda" "Australia" "Austria" "Azerbaijan" "Burundi" "Belgium" "Benin" "Burkina Faso" "Bangladesh" "Bulgaria" "Bahrain" "Bahamas" "Bosnia and Herzegovina" "Belarus" "Belize" "Bermuda" "Bolivia, Plurinational State of" "Brazil" "Barbados" "Brunei Darussalam" "Bhutan" "Botswana" "Central African Republic" "Canada" "Switzerland" "Chile" "China" "Côte d’Ivoire" "Cameroon" "Congo, the Democratic Republic of the" "Congo" "Cook Islands" "Colombia" "Comoros" "Cape Verde" "Costa Rica" "Cuba" "Cayman Islands" "Cyprus" "Czech Republic" "Germany" "Djibouti" "Dominica" "Denmark" "Dominican Republic" "Algeria" "Ecuador" "Egypt" "Eritrea" "Spain" "Estonia" "Ethiopia" "Finland" "Fiji" "France" "Micronesia, Federated States of" "Gabon" "United Kingdom" "Georgia" "Ghana" "Guinea" "Gambia" "Guinea-Bissau" "Equatorial Guinea" "Greece" "Grenada" "Guatemala" "Guam" "Guyana" "Hong Kong" "Ho
<?php
//Gather comments for a specific page/post
$comments = get_comments(array(
'post_id' => $post->ID,
'status' => 'approve' //Change this to the type of comments to be displayed
));
?>
<?php foreach( $comments as $comment ){ ?>
<div class="guest-review table-wrapper">
<div class="col-xs-3 col-md-2 author table-cell">
/*
var lightBoxData = {};
JSONData.forEach(function (item) { // loop through each item in the data set
lightBoxData[item.id] = item; // make each item referencable by the ID data field
});
*/
var route = {};
@tysonchamp
tysonchamp / widgets.php
Created June 23, 2016 13:06
Wordpress custom widgets sample code
<?php // Creating the widget
/**
*
* Follow Us On Social Network Widgets
*
**/
class ub_social extends WP_Widget {
function __construct() {
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Important Docs Manager
* Description: Load scripts and styles on specific admin menu pages
* Plugin URI: https://github.com/tysonchamp/
* Version: 1.1
* Author: Tyson
* Author URI: http://fb.com/tysonchampno1
* Licence: Open Source
*/
<?php
if (isset($_POST['generate_csv'])) {
$event_name = $_POST['event'];
$table_name = $_POST['table_name'];
$s_date = $_POST['start_date'];
$e_date = $_POST['end_date'];
<form target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" value="_donations" type="hidden">
<input name="business" value="[email protected]" type="hidden">
<input name="currency_code" value="AUD" type="hidden">
<input name="amount" id="amount" type="text">
[mysqld]
interactive_timeout=300
key_cache_block_size=4096
max_heap_table_size=32M
max_join_size=1000000000
max_allowed_packet=268435456
open_files_limit=10000
query_cache_size=32M
thread_cache_size=100
tmp_table_size=32M
@tysonchamp
tysonchamp / wp-config-part.php
Created August 26, 2015 07:40
Define home url and site url in wp-config.php
define('WP_HOME','http://127.0.0.1/chowringhee');
define('WP_SITEURL','http://127.0.0.1/chowringhee');