Skip to content

Instantly share code, notes, and snippets.

View widiu7omo's full-sized avatar
🤓
Focused and coding! 🔍💻

Danar Widi widiu7omo

🤓
Focused and coding! 🔍💻
View GitHub Profile
@widiu7omo
widiu7omo / short-number-format.php
Created October 14, 2022 03:40 — forked from RadGH/short-number-format.php
Short Number Formatter for PHP (1000 to 1k; 1m; 1b; 1t)
<?php
// Converts a number into a short version, eg: 1000 -> 1k
// Based on: http://stackoverflow.com/a/4371114
function number_format_short( $n, $precision = 1 ) {
if ($n < 900) {
// 0 - 900
$n_format = number_format($n, $precision);
$suffix = '';
} else if ($n < 900000) {
@widiu7omo
widiu7omo / swap-ctrl-alt-gnome.md
Created February 17, 2021 07:24 — forked from dchenk/swap-ctrl-alt-gnome.md
Swap CTRL and ALT keys on GNOME

Swap CTRL and ALT keys on GNOME

From here: https://askubuntu.com/a/101877

Create a file called .Xmodmap in your home directory.

$ vim ~/.Xmodmap

Add the following lines to the file:

@widiu7omo
widiu7omo / GoogleDorking.md
Created November 18, 2019 22:26 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
<?php
$username = "root";// sesuaikan username dengan username database kalian
$password = "root";// sesuaikan password dengan password database kalian
$host = "localhost";// sesuaikan dengan host yang kalian gunakan, bisa berupa lokal ataupun koneksi ke server dengan ip address
$database = "praktikum"; // sesuaikan dengan nama database yang kalian buat.
$
@widiu7omo
widiu7omo / babyshark bootstraped.php
Last active September 25, 2018 06:09
Memperindah tampilan babyshark
<!doctype html>
<html>
<head>
<title>Baby Shark</title>
<link rel="shortcut icon" href="hiu.png" type="image/x-icon" />
<meta charset="UTF-8">
<!--IE Compatibility modes-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--Mobile first-->
@widiu7omo
widiu7omo / babyshark.php
Created September 25, 2018 05:51
Make Lyrics with Array
<?php
$lirik = "doo doo, doo doo doo doo";
$lagu = array("Baby Shark","Mummy Shark","Daddy Shark","Grandma Shark","Granpa Shark","Lets go hunt","Run away","Safe at last","It's the end");
for ($i=0; $i <9; $i++)
{
for ($j=0; $j <=5; $j++)
{
if($i == $i && $j<4){
if($i == $i && $j<3){
echo''.$lagu[$i].' '.$lirik.' <br>';