Skip to content

Instantly share code, notes, and snippets.

View oritromax's full-sized avatar
💭
Working !

Oritro Ahmed oritromax

💭
Working !
View GitHub Profile
$(window).on('load',function () {
var searchinput = 'street_number';
var autocomplete;
autocomplete = new google.maps.places.Autocomplete((document.getElementById(searchinput)),{
types: ['geocode']
});
autocomplete.addListener('place_changed', fillInAddress);
function fillInAddress() {
var place = autocomplete.getPlace();
@oritromax
oritromax / googlemapautocomplete.js
Last active December 12, 2019 23:52
After my hurdle with Google Map JS API, Writing this to help any lost soul. This only serves the purpose of filling a Standard address field ! Make sure you have Places API and Map JS API Enabled in your Google Console !
// Make sure to load this after the HTML is loaded. Also, don't forget to include the API with '&libraries=places' for this to work
$(window).on('load',function () {
// The field where people will search their address, Must be a text input
var searchinput = 'street_number';
// Don't need Place Search For this Example
var autocomplete;
// Could've done the following line a bit easier !
autocomplete = new google.maps.places.Autocomplete((document.getElementById(searchinput)),{
types: ['geocode']
@oritromax
oritromax / trsteel_ckeditor.yml
Created September 15, 2016 15:30
trsteel_ckeditor.yml for Symfony
trsteel_ckeditor:
class: Trsteel\CkeditorBundle\Form\Type\CkeditorType
# transformers: ['html_purifier']
toolbar: ['document', 'clipboard', 'editing', '/', 'basicstyles', 'paragraph', 'links', '/', 'insert', 'styles', 'tools']
toolbar_groups:
document: ['Source','-','Save','-','Templates']
clipboard: ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']
editing: ['Find','Replace','-','SelectAll']
basicstyles: ['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']
paragraph: ['NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft', 'JustifyCenter','JustifyRight','JustifyBlock']
@oritromax
oritromax / address.html
Last active May 23, 2016 17:35
Project For lisa
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Address Page</title>
</head>
<body>
@oritromax
oritromax / bill.php
Last active October 18, 2015 07:16 — forked from sarim/bill.php
<?php
if(isset($_GET['unit'])) {
$userunit = $_GET['unit'];
$bills = array (
array (
'min' => 1,
'max' => 75,
'price' => 3.8
),
@oritromax
oritromax / .htaccess
Created May 18, 2015 17:41
Stripped .htaccess code from html5 boilerplate, only necessary comments were kept
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
<IfModule mod_headers.c>
@oritromax
oritromax / functions.php
Created January 10, 2014 23:42
A simple shortcode to embed responsive youtube video in wordpress. Explained in the code !
<?php
/* Copy and Paste the Whole Code Below this line */
/* When you are using it inside functions.php, You might wanna loose the start and end PHP tag */
/* The Shortcode Format Will be -> [youtube-vid id="Video ID" res="Video Resolution"] */
/* In http://www.youtube.com/watch?v=a8ZeqZrLxpw <- this video, a8ZeqZrLxpw is the id */
/* This simple Shortcode Cover 4 premade resolution and 1 fallback. 240p, 360p, 480p, 720p and 240p fallback */
/* A Very Simple Effort to make your life easier, By Oritro Ahmed [ http://ioritro.com ] */
/* And FYI: you don't need to copy this long comment section */

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@oritromax
oritromax / wp-tricks-2-1
Created March 6, 2013 01:24
All Wordpress Tricks Related with login page
function custom_login_logo() {
echo '<style type="text/css">h1 a { background: url(http://www.abcd.com/image.png) 50% 50% no-repeat !important; }</style>';
}
add_action('login_head', 'custom_login_logo');
@oritromax
oritromax / function.php
Created March 6, 2013 01:08
Wordpress Tricks-1
<?php
function gist_shortcode($atts) {
return sprintf(
'<script src="https://gist.github.com/%s.js%s"></script>',
$atts['id'],
$atts['file'] ? '?file=' . $atts['file'] : ''
);
} add_shortcode('gist','gist_shortcode');
function