Skip to content

Instantly share code, notes, and snippets.

View heiswayi's full-sized avatar
👽

Heiswayi Nrird heiswayi

👽
View GitHub Profile
@heiswayi
heiswayi / img-upload.php
Created October 25, 2017 16:44
Internal Image Hosting Script
<?php
// Configuration
$title = 'Internal Image Hosting Script';
$filedir = 'up'; // uploaded image dir
$maxsize = 5242880; //max size in bytes
$allowedExts = array('png', 'jpg', 'jpeg', 'gif');
$allowedMime = array('image/png', 'image/jpeg', 'image/pjpeg', 'image/gif');
$baseurl = $_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'/'.$filedir;
function compressImage($source_url, $destination_url, $quality) {
@heiswayi
heiswayi / hiking-malaysia.csv
Last active August 21, 2023 06:00
Senarai kedudukan Gunung/Bukit di Malaysia berdasarkan ketinggian untuk rujukan pendaki-pendaki gunung.
KEDUDUKAN NAMA GUNUNG/BUKIT LOKASI KETINGGIAN (m)
1 Gunung Kinabalu Sabah 4,095
2 Gunung Trusmadi Sabah 2,642
3 Gunung Tambuyukon Sabah 2,579
4 Gunung Murud Sarawak 2,422
5 Gunung Mulu Sarawak 2,376
6 Gunung Tahan Pahang 2,187
7 Gunung Korbu Perak 2,183
8 Gunung Yong Belar Sempadan Perak-Kelantan 2,181
9 Gunung Gayong Perak 2,173
@heiswayi
heiswayi / SystemErrorCode.csv
Last active July 26, 2023 22:46
Searchable System Error Codes: 1 to 15841
Error Code Description
Error Code 1 Incorrect function. [ERROR_INVALID_FUNCTION (0x1)]
Error Code 2 The system cannot find the file specified. [ERROR_FILE_NOT_FOUND (0x2)]
Error Code 3 The system cannot find the path specified. [ERROR_PATH_NOT_FOUND (0x3)]
Error Code 4 The system cannot open the file. [ERROR_TOO_MANY_OPEN_FILES (0x4)]
Error Code 5 Access is denied. [ERROR_ACCESS_DENIED (0x5)]
Error Code 6 The handle is invalid. [ERROR_INVALID_HANDLE (0x6)]
Error Code 7 The storage control blocks were destroyed. [ERROR_ARENA_TRASHED (0x7)]
Error Code 8 Not enough storage is available to process this command. [ERROR_NOT_ENOUGH_MEMORY (0x8)]
Error Code 9 The storage control block address is invalid. [ERROR_INVALID_BLOCK (0x9)]
@heiswayi
heiswayi / css-style-guide.md
Created September 23, 2015 05:39 — forked from fleishmanhillard/css-style-guide.md
CSS style guide with coding standards and best practices.

CSS Style Guide

All rules and guidelines in this document apply to css/scss files unless otherwise noted.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@heiswayi
heiswayi / fm.php
Created October 25, 2017 14:00
Single PHP File Manager Script - Screenshot: https://i.imgur.com/4OtrKUz.png
<?php
/**
* File Manager Script
*/
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
@heiswayi
heiswayi / .htaccess
Last active June 15, 2023 17:03 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
# 301 Redirects for .htaccess
# ===========================
# Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
# Redirect an entire site:
Redirect 301 / http://www.domain.com/
# Redirect an entire site to a subfolder
@heiswayi
heiswayi / google-dorks-2015.txt
Created October 26, 2015 07:14
Google Dorks List 2015
intitle:index.of .bash_history
intitle:index.of .sh_history
intitle:"Index of" index.html.bak
intitle:"Index of" index.php.bak
intitle:"Index of" index.jsp.bak
intitle:"Index of" ".htpasswd" htpasswd.bak
inurl:backup intitle:index.of inurl:admin
"Index of /backup"
intitle:"Index of" index.html~
intitle:"Index of" index.php~
@heiswayi
heiswayi / zipper.php
Created July 20, 2018 17:46
Example of PHP script I used to zip a folder and then force download the zipped file when this script is visited thru web browser
<?php
$dir = 'inescov1';
$zip_file = 'inescov1.zip';
// Get real path for our folder
$rootPath = realpath($dir);
// Initialize archive object
$zip = new ZipArchive();
@echo off
rem Set the time for the hibernation
set /p time="Enter the time for the hibernation (in 24-hour format): "
rem Convert the time to a Unix timestamp
rem (This is necessary for the shutdown command)
set timestamp=%time:~0,2%%time:~3,2%%time:~6,2%000
rem Hibernate the computer
@heiswayi
heiswayi / malaysia.geojson
Last active May 3, 2023 04:56
Malaysia Map GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.