Skip to content

Instantly share code, notes, and snippets.

View kebalicious's full-sized avatar
being a star

Kebal kebalicious

being a star
View GitHub Profile
@kebalicious
kebalicious / GTWalsheimPro.md
Created March 28, 2023 17:28 — forked from mfd/GTWalsheimPro.css
GT Walsheim Pro

https://cdn.rawgit.com/mfd/7c7a915eb31474cc8c6a65066a4c4dc3/raw/f0f2fb94c21dea904812a53e0eb6cf0bc87f3754/GTWalsheimPro.css

<link rel="https://cdn.rawgit.com/mfd/7c7a915eb31474cc8c6a65066a4c4dc3/raw/f0f2fb94c21dea904812a53e0eb6cf0bc87f3754/GTWalsheimPro.css">

@kebalicious
kebalicious / countries-states-json
Created December 2, 2021 02:39
Countries with States List in JSON format
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
@kebalicious
kebalicious / round-off-nearest-myr
Last active December 1, 2021 19:26
Round Off to Nearest for MYR
$value = 0.29;
$getval = substr($value, -1);
$var = substr($value, -2, 1) + 1;
if ($getval <= 2) {
$final = substr_replace($value, 0, -1);
} elseif ($getval >= 3 && $getval <= 7) {
$final = substr_replace($value, 5, -1);
} elseif ($getval >= 8 && $getval <= 9) {
$notyet = substr_replace($value, 0, -1);
@kebalicious
kebalicious / mykad-validation
Last active November 3, 2021 06:25
MyKad Validation
// MyKad
$this->myKad = "010203-04-1234";
$this->myKad = str_replace(['-', ' '], '', $this->myKad);
if (!is_numeric($this->myKad)) {
return "not valid mykad no";
} elseif (strlen($this->myKad) != 12) {
return "mykad no should contains 12 digits";
}
@kebalicious
kebalicious / dynamic-fields-add-to-form.markdown
Created October 8, 2021 08:13
Dynamic Fields add to form
@kebalicious
kebalicious / autocomplete-dropdown-lookup-list-with-bells-and-whistles.markdown
Created October 8, 2021 08:12
Autocomplete Dropdown Lookup List with Bells and Whistles

Autocomplete Dropdown Lookup List with Bells and Whistles

Been planning and saving up to finally ship the perfect autocomplete control with all the makings? This here is the best one north of the intergallactic boundary. It looks up values from a list as the user starts typing. The nice thing is that it looks up 'Starts With' as well as 'Contains' ...which I believe is sweet in some applications. Enjoy and share | Sander

A Pen by Sander (Sandroid) on CodePen.

License.

@kebalicious
kebalicious / google-search-box-w-drop-down-with-suggestions.markdown
Created October 8, 2021 08:12
Google Search Box w/ drop-down with suggestions
@kebalicious
kebalicious / index.html
Created October 4, 2021 07:06
Select2 test
<div class="container">
<h2>Select2 Test</h2>
<p>Fluid responsiveness and momentum scrolling on the results drop down </p>
<select class="select2" name="country">
<optgroup label=" ">
<option value="AU" selected> Australia </option>
<option value="BR"> Brazil (Brasil) </option>

Color picker

Pen is a demonstration of use color picker to change the background color and text color of the element and also about vertical and horizontal centered.

A Pen by Jakub Turský on CodePen.

License.

@kebalicious
kebalicious / gist:0a10c53c279802b495c0e408d737e30b
Created January 26, 2021 20:18
Delete multiple line based on search result
1. Ctrl-F / Cmd-F to open find.
2. Paste your string.
3. Alt-Enter to select all of the instances of the string on the page.
4. Ctrl-L / Cmd-L to broaden the selection to the entire line of each instance on the page.
5. Ctrl-Shift-K / Cmd-Shift-K / Delete / Backspace to remove those lines.