Skip to content

Instantly share code, notes, and snippets.

View vishalbandre's full-sized avatar
💭
I may be slow to respond.

Vishal Bandre vishalbandre

💭
I may be slow to respond.
View GitHub Profile
// Jetpack Infinite or Endless Pagination or Scroll Support in Wordpress
add_theme_support('infinite-scroll', array(
'container' => 'content',
'footer' => page,
'footer_callback' => 'branded_footer',
'posts_per_page' => '7',
));
/* Adding custom branded footer to Jetpack Infinite Scroll */
function branded_footer(){
add_theme_support( 'infinite-scroll', array(
'type' => 'scroll',
'footer_widgets' => false,
'container' => 'content',
'wrapper' => true,
'render' => false,
'posts_per_page' => false,
));
<ul id="content">
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php endwhile; endif; ?>
</ul>
import sys
print("Hello World")
# Check python version
print(sys.version_info[0])
class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, Java.");
}
}
import 'dart:convert';
import 'package:http/http.dart' as http;
class Example {
Future<String> _getIPAdress() {
final url = 'https://httpbin.org/ip';
return http.get(url).then(response) {
String ip = jsonDecode(response.body)['origin'];
return ip;
}
main(){
print('Welcome to Factober!');
}
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@vishalbandre
vishalbandre / webstoemp-gulpfile.js
Created September 5, 2021 14:12 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");