This file contains 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
function random_tax() { | |
$counter = 0; | |
$max = 5; // Set max number of items here. | |
$cats =''; | |
$categories=get_categories(); | |
$rand_keys = array_rand($categories, $max); | |
foreach ($rand_keys as $key) { | |
$cats .= $categories[$key]->term_id .','; | |
} |
This file contains 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
<li> | |
<?php if(!get_field("content_1") && (!get_field("content_2")): ?> | |
// Full width image code | |
<?php else: ?> | |
// Regular image code | |
<?php endif; ?> | |
</li> | |
&& - both things |
This file contains 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
server() { | |
if [ -z "$1"] | |
then | |
python -m SimpleHTTPServer 8000 | |
else | |
python -m SimpleHTTPServer $1 | |
fi | |
} |
This file contains 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
killport() { | |
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9 | |
echo "Port" $1 "killed." | |
} |
This file contains 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
@mixin rotated-text($num-letters: 100, $angle-span: 180deg, $angle-offset: 0deg) { | |
$angle-per-char: $angle-span / $num-letters; | |
@for $i from 1 through $num-letters { | |
.char#{$i} { | |
@include transform(rotate($angle-offset + $angle-per-char * $i)); | |
} | |
} | |
} |
NewerOlder