Skip to content

Instantly share code, notes, and snippets.

View dianariyanto's full-sized avatar
🔥
Working from home

Dian Ariyanto dianariyanto

🔥
Working from home
View GitHub Profile
@dianariyanto
dianariyanto / Kode Form Pencarian Wapka
Last active August 29, 2015 14:24
Form Pencarian Wapka
<form action="/site_IDSitus.xhtml" method="get"> <input type="text" name="get-keyword" size="15" style="background:url(/img/4754/4754894_4faa88ad9f.png) no-repeat right center #fff; padding-right:17px;" /> <select name="get-dir"> <option value="Image">Image</option> <option value="Music">Music</option> <option value="Ringtone">Ringtone</option> <option value="Video">Video</option> <option value="Theme">Theme</option> <option value="Software">Software</option> <option value="Game">Game</option> <option value="Animation">Animation</option> </select>:admin-hash-input: <input type="submit" value="Search"></input></form>
@dianariyanto
dianariyanto / Related Music Wapka
Created July 7, 2015 02:45
Related Music Post on Wapka
@dianariyanto
dianariyanto / sitemap.xml.php
Created January 27, 2017 15:34 — forked from artlung/sitemap.xml.php
Generate XML sitemap from list of urls
<?php
/**
*
* This is a quick way to turn a simple text file
* with a list of urls in a text file (sitemap-urls.txt)
* into a valid XML Sitemap:
* http://en.wikipedia.org/wiki/Sitemaps
* Put this file sitemap.xml.php and sitemap-urls.txt at
* the webroot http://example.com/sitemap.xml.php
<?php
/**
*
* This is a quick way to turn a simple text file
* with a very long list of urls in a text file (sitemap-urls.txt)
* Where "very long" is an expected url number greater than 10,000
* If loaded without a valid query parameter "page" it will load a
* Site Index site map, otherwise load the individual XML site map
* 10,000 urls into a valid XML Sitemap:
* http://en.wikipedia.org/wiki/Sitemaps
<?php
header("Content-Type: application/rss+xml; charset=ISO-8859-1");
DEFINE ('DB_USER', 'my_username');
DEFINE ('DB_PASSWORD', 'my_password');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'my_database');
$rssfeed = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$rssfeed .= '<rss version="2.0">';
@dianariyanto
dianariyanto / README.md
Created July 24, 2020 00:02 — forked from hasanbayatme/README.md
Easy to use Bash Script to Install LAMP stack on Ubuntu.

Installation

Automatic

Run the below command in terminal:

wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash
@dianariyanto
dianariyanto / submit.md
Created November 15, 2020 23:25 — forked from tanaikech/submit.md
Enhanced makeCopy() using Google Apps Script

Enhanced makeCopy() using Google Apps Script

Overview

This is sample scripts for copying files to a specific folder in Google Drive using Google Apps Script (GAS).

Description

When the files in Google Drive are copied to a specific folder using GAS, most users will use makeCopy(destination). When the files are copied using makeCopy(), you might have already noticed that only the standalone projects cannot be copied to the specific folder. They are copied to the root folder (My Drive). Also this situation can be also seen even when "copy" of Drive API v2 and v3 is used. I think that this might be a bug. So I would like to introduce 2 sample scripts as the workaround. In the workaround, it uses Drive API.

Sample script 1

This sample is very simple.

@dianariyanto
dianariyanto / debloat_mokee_rom.log
Created December 4, 2021 22:19
Debloat mokee ROM with GAPPS pico
╭─aryan@lenovo ~
╰─$ adb shell
santoni:/ # pm list packages | grep 'mokee'
package:org.mokee.overlay.dark
package:org.mokee.overlay.accent.red
package:org.mokee.audiofx
package:com.kabouzeid.gramophone.mokee
package:com.mokee.pay
package:org.mokee.overlay.accent.black
package:org.mokee.overlay.accent.brown
@dianariyanto
dianariyanto / gist:d7e78ab570844d94c0ce4544e6e7e995
Created February 8, 2022 23:08
Mirror git to a new repository
git clone --bare <repo>
cd repofolder
git push --mirror <newrepo>
@dianariyanto
dianariyanto / loadbalance-test
Created February 17, 2022 17:42
Simple script to check multiwan loadbalance
#!/bin/bash
# https://www.shellcheck.net/
for i in `seq 1 9000`;
do
ip=$(curl -s "https://projects.milankragujevic.com/ip.php")
echo -e "\e[36;1m" $i "\e[0m served from : $ip"
#ping -c 1 192.168.1.1
#ping -c 1 192.168.3.1
done