Skip to content

Instantly share code, notes, and snippets.

View surahmans's full-sized avatar

Surahman surahmans

  • SALT Indonesia
  • Depok, Jawa Barat, Indonesia
View GitHub Profile
@surahmans
surahmans / addvh.sh
Last active August 29, 2015 14:22 — forked from lijinma/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!";
@surahmans
surahmans / laravel-new.sh
Created March 19, 2016 09:40 — 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.
laravel-new() {
if [ -z "$1" ]; then
cat << EOF
Please provide a directory name.
Usage:
laravel-new [directory-name]
EOF
return;
@surahmans
surahmans / directions.js
Created January 30, 2018 09:41 — 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/
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 ) {