/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content="Responsive Nav Tabs to Accordion Snippet"> | |
<meta name="author" content="Filkris"> | |
<title>Bootstrap 4 Responsive Nav Tabs to Accordion Snippet</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<!-- Snippet start --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str_path = '/PATH/'; | |
$cls_rii = new \RecursiveIteratorIterator( | |
new \RecursiveDirectoryIterator( $str_path ), | |
\RecursiveIteratorIterator::CHILD_FIRST | |
); | |
$ary_files = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function scopeWithAndWhereHas($query, $relation, $constraint){ | |
return $query->whereHas($relation, $constraint) | |
->with([$relation => $constraint]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Composer on Centos, Ubuntu, Debian | |
# Author Yusuf Ayuba | |
user_allow="root" | |
if [ "$(whoami)" != $user_allow ]; then | |
echo "===================================================================" | |
echo " Installasi gagal. Install composer harus menggunakan user: "$user_allow" =" | |
echo "===================================================================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('GMT'); | |
//1- file we want to serve : | |
$data_file = "/home/f0rud/Aalto Talk with Linus Torvalds [Full-length].mp4"; | |
$data_size = filesize($data_file); //Size is not zero base | |
$mime = 'application/otect-stream'; //Mime type of file. to begin download its better to use this. | |
$filename = basename($data_file); //Name of file, no path included |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Case in-sensitive array_search() with partial matches | |
* | |
* @param string $needle The string to search for. | |
* @param array $haystack The array to search in. | |
* | |
* @author Bran van der Meer <branmovic@gmail.com> | |
* @since 29-01-2010 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Source: http://goo.gl/p2GybZ | |
*/ | |
// for object | |
function buildTree($items) { | |
$childs = array(); | |
foreach($items as $item) |
NewerOlder