Skip to content

Instantly share code, notes, and snippets.

View shubham9411's full-sized avatar
🐢
Running

Shubham Pandey shubham9411

🐢
Running
View GitHub Profile
@shubham9411
shubham9411 / hosts
Last active May 22, 2020 04:11
hosts file
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
@shubham9411
shubham9411 / index.html
Created August 5, 2018 06:42
Pure CSS Alitalia Boarding Pass / Ticket
<div class="boarding-pass">
<header>
<svg class="logo">
<use xlink:href="#alitalia"></use>
</svg>
<div class="flight">
<small>flight</small>
<strong>AL 101</strong>
</div>
@shubham9411
shubham9411 / index.html
Created August 5, 2018 06:41
Ticket Stub
<div class='event'>
<div class='event-side'>
<div class='dotted-line-separator'><span class='line'></span></div>
<div class='event-icon'><span class='fa fa-users'></span></div>
<div class='event-date'>Jan 17</div>
<div class='event-time'>11 PM <span class='to'>to </span>12 PM</div>
<div class='cut-out'></div>
</div>
<div class='event-body'>
<div class='event-image'><a href='#'><span class='image'></a></div>
@shubham9411
shubham9411 / lamp.sh
Created June 22, 2017 10:41
Installing LAMP stack on AWS
#!/bin/bash
sudo yum -y update
sudo yum install -y gcc make gcc-c++ git httpd24 mod24_ssl php70 php70-devel php70-mysql php70-mysqlnd php70-pdo php70-mbstring php70-mcrypt php-gd php-pear php70-pecl-apc
sudo pear install Log
sudo service httpd start
sudo chkconfig httpd on
sudo service httpd restart
sudo chown -R ec2-user /var/www
sudo yum install mysql mysql-server
sudo chkconfig mysqld on
@shubham9411
shubham9411 / scrape-fb-links.sh
Last active November 25, 2020 10:08
Script for scraping all the urls in facebook
@shubham9411
shubham9411 / open-graph-urls.php
Last active March 26, 2017 12:10
Change https to http urls in Yoast SEO
<?php
/**
* Plugin Name: Open Graph URLs for facebook
* Plugin URI: https://shubhampandey.in/migrating-website-http-https/
* Description: Change all your https url to http for facebook for Yoast SEO
* Author: Shubham Pandey
* Version: 1.0.0
* Author URI: https://shubhampandey.in
* License: GPL2+
*
@shubham9411
shubham9411 / tic tac toe.cpp
Last active March 18, 2017 19:48
Tic Tac Toe implemented in CPP, Multiplayer
// Created 15 ‎January ‎2016, ‏‎6.49.10 PM 😛
#include<stdio.h>
#include<conio.h>
#include<process.h>
int ar[10],i,j,count=0,choice,turn;
void win(int des)
{
if(des==0)
{
printf("\n\n************Congretulations !!!!!!!!!!!!!!!!!\n"); //typos
@shubham9411
shubham9411 / codesniffer.ruleset.xml
Created February 18, 2017 19:27
Basic ruleset file for WordPress Sniffing
<?xml version="1.0"?>
<ruleset name="WordPress Theme Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
@shubham9411
shubham9411 / .travis.yml
Created February 18, 2017 19:23
Travis CI config for WordPress
# Travis CI (MIT License) configuration file for the solitude WordPress theme.
# @link https://travis-ci.org/
# For use with the solitude WordPress theme.
# @link https://github.com/shubham9411/solitude
# Ditch sudo and use containers.
# @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
# @link http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure
sudo: false
@shubham9411
shubham9411 / custom-field.php
Created January 19, 2017 05:22
How you can add custom fields to you WordPress Theme.
<?php
if(!function_exists('spx_custom_field')){
function spx_custom_field($attr){
global $post;
$name = $attr['name'];
if(empty($name)) return;
return get_post_meta( $post->ID, $name, true );
}
}
add_shortcode('new_field','spx_custom_field');