Skip to content

Instantly share code, notes, and snippets.

View sauliuz's full-sized avatar

Saulius Zukauskas sauliuz

View GitHub Profile
@sauliuz
sauliuz / index.html
Created March 1, 2015 20:00
main index.html file for Framework7 tutorial on HTMLCenter
<!DOCTYPE html>
<html>
<head>
<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">
<title>HTMLCenter</title>
<!-- Path to Framework7 Library CSS-->
<link rel="stylesheet" href="css/framework7/framework7.min.css">
@sauliuz
sauliuz / specific_number_of_words_wordpress.php
Created April 2, 2013 13:49
Show specific number of words in WordPress post content
<?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
sauliuz / WordPress odd or even.php
Last active December 15, 2015 13:49
Check if WordPress post number is even or odd. And running some actions based on findings
<?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) : ?>
# Specific Nginx configuration
# Redirect to Jenkins on port 8080
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
# Main Nginx config
server {
listen 80;