Skip to content

Instantly share code, notes, and snippets.

Saulius Zukauskas sauliuz

Block or report user

Report or block sauliuz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Nginx and local Jenkins CI configuration
# Specific Nginx configuration
# Redirect to Jenkins on port 8080
upstream app_server {
server fail_timeout=0;
# Main Nginx config
server {
listen 80;
sauliuz / index.html
Created Mar 1, 2015
main index.html file for Framework7 tutorial on HTMLCenter
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Path to Framework7 Library CSS-->
<link rel="stylesheet" href="css/framework7/framework7.min.css">
sauliuz / specific_number_of_words_wordpress.php
Created Apr 2, 2013
Show specific number of words in WordPress post content
View specific_number_of_words_wordpress.php
// This code can be used directly in the WP loop
// But neater implementation would be to implement it
// Into WordPress theme functions.php file
// instead of using the_content() funcion
// we use new WordPress function (>3.0) to trim content
// to specific number of words
$content = get_the_content();
sauliuz / WordPress odd or even.php
Last active Dec 15, 2015
Check if WordPress post number is even or odd. And running some actions based on findings
View WordPress odd or even.php
// First we need to set counter
$postnum = 1;
// Running WordPress loop to get all posts
if (have_posts()) :
while (have_posts()) : the_post();
// Time to check if post number is even or odd
if ($postnum&1) : ?>
You can’t perform that action at this time.