-
Emoji unicode characters
echo -e "\xF0\x9F\x8D\xBA"
-
Show git branch name
git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /
-
“Non-printing sequences such as color codes must be surrounded by
\[
and\]
so their lengths are not counted as part of the length of the prompt.” — Bash prompt history issue - Stack Overflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get All Photos for a Tag on Instagram | |
*/ | |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
$everything = array(); | |
$access_token = 'need access token for Instagram API'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sort files by creation date, write to JSON | |
*/ | |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
// Put all the files into an array | |
$path = 'some-files/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The PHP way | |
if ( isset( $var ) && ! empty( $var ) ) { | |
// do something | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in export/*.xml; do wp import $f --authors=create; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.column { | |
float: left; | |
// 1 column | |
&:first-child:nth-last-child(1) { | |
width: 100%; | |
} | |
// 2 columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s www.amazon.com | cat | tail |
The following are common XSS vulnerabilities found in iFrame busters.
- Unescaped URL parameter values
- Parameters that accept any domain
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.