Skip to content

Instantly share code, notes, and snippets.

View matthewpizza's full-sized avatar
🌸
°˖✧◝(◠ᴥ◠)◜✧˖°

matthewpizza

🌸
°˖✧◝(◠ᴥ◠)◜✧˖°
View GitHub Profile
@matthewpizza
matthewpizza / save_tagged_photos.php
Created April 27, 2014 19:30
Download all the photos on Instagram for a tag. Probably hit API limits for popular tags
<?php
/**
* Get All Photos for a Tag on Instagram
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
$everything = array();
$access_token = 'need access token for Instagram API';
@matthewpizza
matthewpizza / files_to_json.php
Created April 27, 2014 19:22
Sort files by creation date, write JSON
<?php
/**
* Sort files by creation date, write to JSON
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Put all the files into an array
$path = 'some-files/';
@matthewpizza
matthewpizza / 1_isset_not_empty.php
Last active July 19, 2016 13:44
Why Twig Rules
<?php
// The PHP way
if ( isset( $var ) && ! empty( $var ) ) {
// do something
}
#!/bin/bash
for f in export/*.xml; do wp import $f --authors=create; done
# http://stackoverflow.com/a/6086978/609264
# http://apps.timwhitlock.info/emoji/tables/unicode
function _cool_prompt {
local __user_and_host="\[\033[00;32m\]\u@\h"
local __cur_location="\[\033[00;96m\]\w"
local __git_branch_color="\[\033[35m\]"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="`echo -e "\xF0\x9F\x8D\xBA"`"
local __last_color="\[\033[00m\]"
.column {
float: left;
// 1 column
&:first-child:nth-last-child(1) {
width: 100%;
}
// 2 columns
{
"caret_style": "phase",
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"font_face": "Consolas",
"font_size": 15.0,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
curl -s www.amazon.com | cat | tail

Guidelines for iFrame Busters

The following are common XSS vulnerabilities found in iFrame busters.

  1. Unescaped URL parameter values
  2. Parameters that accept any domain

Unescaped URL parameter values

Special characters should be removed or converted into their equivalent HTML/hex entity. The characters in the following table can be used to write malicious code on the page.