Skip to content

Instantly share code, notes, and snippets.

Avatar

Surahman surahmans

  • SALT Indonesia
  • Depok, Jawa Barat, Indonesia
View GitHub Profile
@surahmans
surahmans / directions.js
Created Jan 30, 2018 — forked from levymetal/directions.js
Tutorial on how to calculate driving distance using Google maps API, full post available @ http://christianvarga.com/how-to-calculate-driving-distance-between-2-locations-with-google-maps-api/
View directions.js
var directionsService = new google.maps.DirectionsService();
var request = {
origin : 'Melbourne VIC', // a city, full address, landmark etc
destination : 'Sydney NSW',
travelMode : google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if ( status == google.maps.DirectionsStatus.OK ) {
@surahmans
surahmans / laravel-new.sh
Created Mar 19, 2016 — forked from mul14/laravel-new.sh
Simple script to create Laravel project and cd into target directory. Put this script in your bashrc or zshrc file.
View laravel-new.sh
laravel-new() {
if [ -z "$1" ]; then
cat << EOF
Please provide a directory name.
Usage:
laravel-new [directory-name]
EOF
return;
View addvh.sh
#! /bin/bash
httpd_conf_file='/etc/apache2/httpd.conf';
hosts_file='/etc/hosts';
server_name='';
function check()
{
if [ "$httpd_conf_file" = "" ]; then
echo "You must config the httpd_conf_file!";