Runs a connect web server, serving files from /client
on port 3000
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
username = pksunkara | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[sendemail] | |
smtpencryption = tls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class S3 { | |
private $key = 'ABC123'; | |
private $secret = 'lolftw'; | |
private $region = 'us-west-2'; | |
private $bucket = 'examplebucket'; | |
private $host = 's3.amazonaws.com'; | |
public function uploadFile($file_path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login to your Amazon EC2 Instance via SSH. | |
# If you are logged in as root, you don't need to use the sudo command in the commands below. | |
# Update the current packages installed on the system | |
sudo yum upgrade | |
# Install the required packages before installing Apache / MySQL and PHP | |
sudo yum install gcc gcc-c++ autoconf automake pcre-devel \ | |
libxml2-devel bzip2-devel libcurl-devel freetype-devel \ | |
openldap-clients cyrus-sasl-devel openldap-devel \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (c) 2014-2017 Praveen Saxena <> | |
# License: BSD-3-Clause | |
# | |
# To get: | |
# rm -rf mysql_secure_installation && wget -O mysql_secure_installation https://gist.githubusercontent.com/saxenap/b84d67f63a5fc315c5895648438fd2d0/raw && chmod 777 mysql_secure_installation && ./mysql_secure_installation | |
# | |
# Automate mysql secure installation for Red Hat Enterprise Linux (RHEL) compatible distributions | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Specifically, this gruntfile will perform the following. | |
- CSS: | |
-- Compile SCSS | |
-- Add vendor prefixes for the last 10 browser versions | |
- JS: | |
-- Run scripts through jshint to detect errors and potential problems in code. | |
-- Compile scripts to your destination folder in their original state. Use these in development environments as they'll be easier to debug with as their code doesn't exist on 1 line, nor is it obfuscated. | |
-- Minify and concatenate scripts into one all.min.js. Uglify will also obfuscate code if you set mangle to true, leave as false if using AngularJS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AUTHOR = AUTHOR | |
EMAIL = EMAIL | |
PROJECT = PROJECT | |
PROJECTNAMESPACE = PROJECTNAMESPACE | |
BUILDFILE = $(PROJECT).phar | |
SRCDIR = src | |
TESTDIR = tests | |
PHPUNITCONFIG = phpunit.xml.dist | |
BOOTSTRAP = bootstrap.php | |
PHPUNIT = vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# node ---------------> ~/.nvm/<node-version>/bin/node | |
# node-libraries -----> ~/.node_libraries | |
# node-binaries ------> ~/.node_binaries | |
# | |
aptitude install g++ curl libssl-dev apache2-utils make | |
git clone git://github.com/creationix/nvm.git ~/.nvm | |
vi ~/.bashrc | |
export PATH=$PATH:~/.node_binaries | |
NVM_DIR=$HOME/.nvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |