Skip to content

Instantly share code, notes, and snippets.

View ryumada's full-sized avatar
🤔
What should I code?

Rizuki Ryumada ryumada

🤔
What should I code?
  • garasijogi
  • Indonesia
View GitHub Profile
@ryumada
ryumada / cloudSettings
Last active March 12, 2022 12:55
vscode-setting
{"lastUpload":"2022-03-12T12:55:12.113Z","extensionVersion":"v3.4.3"}
@ryumada
ryumada / show-hide-button_JQuery.js
Last active November 10, 2020 03:34
Show button on mousehover Jquery Javascript HTML
//show hide button when hovering on table row
//using Jquery
$(document).ready(function () {
$(document).on('mouseenter', '#table_row', function () {
$(this).find("#table-button").show();
}).on('mouseleave', '#table-row', function () {
$(this).find("#table-button").hide();
});
});
@ryumada
ryumada / .htaccess
Last active September 1, 2022 21:56
web.config for IIS 8 to run codeigniter v3.1.11 application
# htaccess to placed on root folder of php project using apache2 server
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
@ryumada
ryumada / spectacle-custom_global_shortcut
Last active June 20, 2020 07:23
KDE Plasma Custom Config
# My Spectacle Custom Shortcut, Spectacle is a screenshot app for linux, and default app on kde flavor.
[Data]
DataCount=1
[Data_1]
Comment=Comment
DataCount=4
Enabled=true
Name=Spectacle Custom
@ryumada
ryumada / svg-image-custom-source.svg
Created June 12, 2020 06:06
custom image as svg image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryumada
ryumada / svg-bootstrap-carousel.svg
Last active March 27, 2022 04:55
bootstrap carousel on svg frame. using php base_url to locate image.
@ryumada
ryumada / _useful-linux-command.md
Last active June 2, 2023 08:53
Useful Linux Command
@ryumada
ryumada / _initial.md
Last active July 6, 2020 03:01
Brief Notes - Codeigniter 4

Codeigniter 4 initial setup

  1. start with permission on writable to owner of your user and the group is www-data. to do this run command like this

sudo chown rizuki-ryumada:www-data writable

sudo chown rizuki-ryumada:www-data writable/*

  1. And don't forget to set the permission to 775 or 755 for wirtable folder and the sub folder items.
  2. And set base url to your virtual host site url on .env file or on config file
@ryumada
ryumada / datatables-serversided-php.php
Last active October 14, 2020 09:17
Javascript Snippest
<!-- /* -------------------------------------------------------------------------- */
/* BASIC USE */
/* -------------------------------------------------------------------------- */ -->
<script>
// siapkan data buat dikirim ke server
var oke = 'oke';
// Tabel HealthReport
table = $('#report_healthCheckIn').DataTable({
responsive: true,
processing: true,
@ryumada
ryumada / php_convert-to-csv.php
Last active February 7, 2021 01:52
function to create an associative array from csv file using fgetcsv.
<?php
// add some classes or add this function to your class
public function convertToCsv(){
$file = fopen(base_url('mycsv.csv'), 'r'); // take file location
$arr = array(); $x = 0; $index = array(); // prepare variable for container and index
while (($line = fgetcsv($file)) !== FALSE) { // iteration on each line of csv
//$line is an array of the csv elements
if($x == 0){ // for the first line, use it as index
foreach($line as $k => $v){ // iterate the first line