Skip to content

Instantly share code, notes, and snippets.

View harshamv's full-sized avatar
🏠
Working from home

Harsha MV harshamv

🏠
Working from home
View GitHub Profile
@harshamv
harshamv / cakephp-shared-htaccess
Last active August 4, 2020 12:38
CakePHP on GoDaddy Shared Hosting .htaccess settings
#Need to add three .htaccess files as well as configure the database.php file
####### In the root directory
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/ Form excerpt
= f.button t(".save"), class: "btn"
= f.button t(".publish"), class: "btn", name: "publish"
= f.button t(".test"), class: "btn", name: "test"
@harshamv
harshamv / Files.php
Last active August 29, 2015 14:07 — forked from AmyStephen/Files.php
<?php
/**
* File class
*
* @package Molajo
* @copyright 2013 Amy Stephen. All rights reserved.
* @license MIT, GPL v2 or later
*/
namespace Molajo;
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@mixin box-shadow($top, $left, $blur, $size, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $size $color;
-moz-box-shadow:inset $top $left $blur $size $color;
box-shadow:inset $top $left $blur $size $color;
} @else {
-webkit-box-shadow: $top $left $blur $size $color;
-moz-box-shadow: $top $left $blur $size $color;
box-shadow: $top $left $blur $size $color;
}
# Google Direction API
include HTTParty
format :json
def api_key
# Your API key
end
def direciton_api_url
/*
* An example of how to use a Google Map overlay to display a label on top of marker.
* This is a slight re-work of http://www.tdmarketing.co.nz/blog/2011/03/09/create-marker-with-custom-labels-in-google-maps-api-v3/
* I suggest you rather view that blog post, this code is pasted here purely for my own personal reference.
*/
var
point = {
lat: 37.8478115,
long: 15.2934327
maps.google.com/maps?q=25.279139,51.551230
#!/bin/bash
# mongodump reference: http://www.nacaolivre.com.br/servidor/mysql-backup-com-mysqldump/
# Author: Lazaro Lima - www.lazarolima.com.br
#
S3_BUCKET_NAME="condomundo-databases-snapshots"
S3_BUCKET_PATH="mysql-backups"
MYSQLROOT="yourUserName"
MYSQLPASS="yourPassword"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Google Maps JavaScript API v3 Example: Geocoding Simple</title>
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet">
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>