Skip to content

Instantly share code, notes, and snippets.

View saxenap's full-sized avatar

Praveen Saxena saxenap

  • West Lafayette, IN
View GitHub Profile
@saxenap
saxenap / Wordpress-Install
Last active August 29, 2015 14:22
Wordpress Install.
#!/bin/bash
#
# Copyright (c) 2014-2017 Praveen Saxena <>
# License: BSD-3-Clause
#
# To get:
# rm -rf wordpress-install && wget -O wordpress-install https://gist.githubusercontent.com/saxenap/7378414e777405c6ef9c/raw && chmod 777 wordpress-install && ./wordpress-install
url=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
title='Test'
@saxenap
saxenap / Grunt-Install
Created June 1, 2015 16:15
Grunt-Install
sudo npm install grunt grunt-contrib-less grunt-contrib-watch grunt-contrib-copy jit-grunt --save-dev
@saxenap
saxenap / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
interface BuildsQuery
{
public function make();
public function __toString();
}
class CurlRequest implements MakesRequest
{
private $result;
public function execute($requestUrl)
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $requestUrl,
@saxenap
saxenap / us-states-and-counties.xml
Last active September 15, 2015 18:20 — forked from bzerangue/us-states-and-counties.xml
US States and Counties in XML and YAML format
<?xml version="1.0" encoding="utf-8"?>
<states updated="2007-10-17">
<state>
<name>Alabama</name>
<abv>AL</abv>
<counties>
<county>Autauga County</county>
<county>Baldwin County</county>
<county>Barbour County</county>
<county>Bibb County</county>
@saxenap
saxenap / world-currency-list.xml
Last active September 15, 2015 18:20 — forked from bzerangue/world-currency-list.xml
World currencies list source from themoneyconverter.com. With name of currency, currency code, (unicode symbols for those available), and rss feed locations.
<?xml version="1.0" encoding="UTF-8"?>
<currency source-url="http://themoneyconverter.com">
<entry code="ARS" feed-location="/rss-feed/ARS/rss.xml">
<name>Argentine Peso</name>
<unicode>
<decimal>36</decimal>
<hex>24</hex>
</unicode>
</entry>
<entry code="AWG" feed-location="/rss-feed/AWG/rss.xml">
@saxenap
saxenap / currency-symbols.xml
Last active September 15, 2015 18:20 — forked from bzerangue/currency-symbols.xml
World currencies with their symbols
<?xml version="1.0" encoding="UTF-8"?>
<!--
## SOURCE: xe.com
-->
<currency-symbol count="115">
<entry code="ALL" unicode-decimal="76, 101, 107" unicode-hex="4c, 65, 6b">Albania Lek</entry>
<entry code="AFN" unicode-decimal="1547" unicode-hex="60b">Afghanistan Afghani</entry>
<entry code="ARS" unicode-decimal="36" unicode-hex="24">Argentina Peso</entry>
<entry code="AWG" unicode-decimal="402" unicode-hex="192">Aruba Guilder</entry>
<entry code="AUD" unicode-decimal="36" unicode-hex="24">Australia Dollar</entry>
@saxenap
saxenap / transform-html5.php
Last active September 15, 2015 18:20 — forked from bzerangue/transform-html5.php
PHP: XSLT Transformation to build HTML5 html output (use xhtml 1.0 strict as your settings in your XSLT stylesheet)
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('XML_SOURCE_LINK_HERE');
// Load XSLT stylesheet
$xsl = new DOMDocument;
$xsl->load('XSL_STYLESHEET_PAGE_LINK_HERE');
@saxenap
saxenap / .htaccess
Created October 27, 2015 17:07 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/