Skip to content

Instantly share code, notes, and snippets.

View marvinhosea's full-sized avatar
🎯
Pin point

Marvin Collins Hosea marvinhosea

🎯
Pin point
View GitHub Profile
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places" type="application/javascript"></script>
<script>
var map = new google.maps.Map(document.getElementById("map-convas"),{
center:{
lat:27.72,
lng: 85.36
},
zoom:15
});
//Run the installer command on terminal
composer global require laravel/installer
//Add composer bin to path so that it can be available in your system.
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc
//Reload your bash
. ~/.bashrc or source ~/.bashrc // they are the same thing
@marvinhosea
marvinhosea / gist:42a46f4ce50310729bff56451823c970
Created February 1, 2019 15:40
Prevent Submitting Form Twice Js
<script>
function sendingForm(button) {
button.disabled = true;
button.innerHTML = "<i class='fa fa-spinner fa-spin '></i> Please wait..";
button.form.submit();
}
</script>
@marvinhosea
marvinhosea / gist:635949a511b606daf2dad50f3d91a1c7
Created May 23, 2019 19:15
Sample Code Go ~ Rick n Motty
package main
import "fmt"
type ricknmotty string
func (r ricknmotty) getWords() (string string){
if r == "Rick"{
return "We got a big announcement to make, Motty do you wanna make the announcement?"
}
RESTORE FILELISTONLY from DISK = '/var/www/erp/harias.bak'
RESTORE DATABASE NEWDB
FROM DISK = '/var/www/erp/harias.bak'
WITH MOVE 'HARIAS OUTFITTERS LIMITED' TO '/var/opt/mssql/data/HARIAS OUTFITTERS LIMITED.mdf',
MOVE 'HARIAS OUTFITTERS LIMITED_log' TO '/var/opt/mssql/data/HARIAS OUTFITTERS LIMITED_log.ldf'
//WORKING
ALTER DATABASE POSDB
SET SINGLE_USER WITH
City response change log
- Removed lat and lat from area object body
- Added sw_lat, sw_lng, ne_lat, ne_lng to area object body as requested by Manu
Get all cities response
{
"status": true,
"cities": [
{
"id": 1,
server {
root /project-dir;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name exampledomain.com www.exampledomain.com;
location / {
<?php
'AF / AFG' => 'Afghanistan',
'AL / ALB' => 'Albania',
'DZ / DZA' => 'Algeria',
'AS / ASM' => 'American Samoa',
'AD / AND' => 'Andorra',
'AO / AGO' => 'Angola',
'AI / AIA' => 'Anguilla',
'AQ / ATA' => 'Antarctica',
'AG / ATG' => 'Antigua and Barbuda',
@marvinhosea
marvinhosea / cloudSettings
Last active October 28, 2020 22:16
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-28T22:16:34.007Z","extensionVersion":"v3.4.3"}
@marvinhosea
marvinhosea / InvNumRepo
Created April 23, 2018 16:17
Inserting Invoice To Sage
<?php
/**
* Created by PhpStorm.
* User: marvin
* Date: 3/22/18
* Time: 11:17 AM
*/
namespace Esl\Repository;