Skip to content

Instantly share code, notes, and snippets.

View herusdianto's full-sized avatar

Heru Rusdianto herusdianto

  • Bandung, West Java, Indonesia
View GitHub Profile
@herusdianto
herusdianto / virtual_host.md
Last active January 29, 2025 06:52
Create Laravel Virtual Host In Linux Mint
  1. Run this command in terminal:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/site.dev.conf
  1. Open that file in your favourite editor:
sudo vi /etc/apache2/sites-available/site.dev.conf
@herusdianto
herusdianto / progress_second.html
Last active January 9, 2017 19:44
Progress Bar Every Second
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Progress Bar Every Second</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
@herusdianto
herusdianto / date.html
Created March 24, 2015 07:02
Javascript Date Interval
<!DOCTYPE html>
<html>
<head>
<title>Javascript Date Interval</title>
<!--
* from benjour answer http://goo.gl/gZWQka
* http://goo.gl/89pfQw
-->
</head>
<body>
@herusdianto
herusdianto / Preferences.sublime-settings
Last active August 29, 2015 14:12
My Sublime Text 2 Setting
{
"font_size": 12,
"margin": 0,
"translate_tabs_to_spaces": true,
"indent_to_bracket": true,
"highlight_line": true,
"trim_trailing_white_space_on_save": true,
"default_line_ending": "unix",
"shift_tab_unindent": true,
"highlight_modified_tabs": true,
@herusdianto
herusdianto / implode.php
Last active August 29, 2015 14:11
PHP Implode Multi Dimensional Array
<?php
$siswa = array(
array(
'nama' => 'Heru Rusdianto',
'umur' => 21
),
array(
'nama' => 'Ibnu Rusdianto',
'umur' => 12
@herusdianto
herusdianto / DatabaseSeeder.php
Last active August 10, 2021 02:56
Laravel Filter JSON Data
<?php
// app/database/seeds/DatabaseSeeder.php
/**
* DatabaseSeeder
*/
class DatabaseSeeder extends Seeder {
/**
@herusdianto
herusdianto / Aktivitas.php
Created November 9, 2014 07:14
Laravel Eloquent Relationship: Many To Many Polymorphic Relations
<?php
// app/models/Aktivitas.php
/**
* Class Aktivitas
*/
class Aktivitas extends Eloquent {
/**
@herusdianto
herusdianto / Aktivitas.php
Created November 8, 2014 09:23
Laravel Eloquent Relationship: Polymorphic Relations
<?php
// app/models/Aktivitas.php
/**
* Class Aktivitas
*/
class Aktivitas extends Eloquent {
/**
@herusdianto
herusdianto / DatabaseSeeder.php
Created November 8, 2014 08:21
Laravel Eloquent Relationship: Has Many Through
<?php
// app/database/seeds/DatabaseSeeder.php
/**
* Class DatabaseSeeder
*/
class DatabaseSeeder extends Seeder {
/**
@herusdianto
herusdianto / DatabaseSeeder.php
Last active August 29, 2015 14:08
Laravel Eloquent Relationship: Many To Many
<?php
// app/database/seeds/DatabaseSeeder.php
/**
* Class DatabaseSeeder
*/
class DatabaseSeeder extends Seeder {
/**