Skip to content

Instantly share code, notes, and snippets.

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

matthewpizza

🌸
°˖✧◝(◠ᴥ◠)◜✧˖°
View GitHub Profile
@matthewpizza
matthewpizza / export_swf_layers.jsx
Created October 30, 2013 15:58
Exports the layers in an Illustrator to SWF using the layer names as file names
/*
Hacked up 04/04/12 to export fucking SWFs
* Description: An Adobe Illustrator script that export each layer as a separate SWF file
* Usage: Layer name is the SWF file name. Rename layers if necessary.
* This is an early version that has not been sufficiently tested. Use at your own risks.
* License: GNU General Public License Version 3. (http://www.gnu.org/licenses/gpl-3.0-standalone.html)
*
* Copyright (c) 2009. William Ngan.
* http://www.metaphorical.net/note/on/layer_export
@matthewpizza
matthewpizza / expandmactarfileinubuntu.sh
Created December 3, 2013 15:14
Problem: When I make a gzipped tar file in OS X and expand it in Ubuntu there are duplicates of every file with `._` prepended to the file name. Solution: Skip those stupid `._` files
tar -xzpvf mytarfile.tgz --exclude="._*"
@matthewpizza
matthewpizza / install-composer.sh
Created February 13, 2014 03:55
Install Composer on Webfaction
cd $HOME
ln -s `which php54` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php54
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile

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.

curl -s www.amazon.com | cat | tail
{
"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"
.column {
float: left;
// 1 column
&:first-child:nth-last-child(1) {
width: 100%;
}
// 2 columns
# 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\]"
#!/bin/bash
for f in export/*.xml; do wp import $f --authors=create; done