Skip to content

Instantly share code, notes, and snippets.

View vslala's full-sized avatar

Varun Shrivastava vslala

View GitHub Profile
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
class CollectionExample {
// Lets start collection...
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
class CollectionExample {
// Lets start collection...
package collections.shoppingcart;
import java.util.Objects;
/**
*
* @author Varun Shrivastava (vslala)
*/
class Product {
package collections.shoppingcart;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Varun Shrivastava (vslala)
*/
package collections.shoppingcart;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Varun Shrivastava
*/
class Cart {
/*
* Create a fully functional program to store and delete objects from the cart
*/
package collections.shoppingcart;
/**
*
* @author Varun Shrivastava
*/
public class Main {
package collections.shoppingcart;
import java.util.List;
import java.util.Scanner;
/**
*
* @author Varun Shrivastava (vslala)
*/
public class UI {
@vslala
vslala / Gruntconfig.js
Created October 11, 2016 10:44
Stacc HMVC Backbone Boilerplate
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-webpack');
@vslala
vslala / clear_wordpress_weird_chars.sql
Last active May 27, 2025 21:36
You might have seen weird characters in your WordPress post recently. This is because of bad character encoding. These SQL commands will update all the bad encoded texts with the correct one.
-- BeMyAficionado.com
-- Backup Database to a .sql file
mysqldump --opt --default-character-set=latin1 --skip-extended-insert --user root --password my-database-name -r exp-my-database-name-latin1.sql --log-error=log-mysqldump-my-database.txt
-- Clean up post_content
UPDATE wp_posts SET post_content = REPLACE(post_content, ' </p>', '</p>');
UPDATE wp_posts SET post_content = REPLACE(post_content, '“', '“');
UPDATE wp_posts SET post_content = REPLACE(post_content, '”', '”');
UPDATE wp_posts SET post_content = REPLACE(post_content, '’', '’');
@vslala
vslala / build.gradle
Created March 6, 2018 07:46
JWT Implementation Demo Gradle Dependencies
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}