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
const { src, dest, series, watch } = require('gulp') | |
const del = require('del') | |
const njk = require('gulp-nunjucks-render') | |
const beautify = require('gulp-beautify') | |
function clean() { | |
return del(['dist']) | |
} | |
function html() { |
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
{% set page_name = 'Home' %} | |
{% set SEO_description = 'SSG using Nunjucks and Gulp' %} | |
{% set SEO_keywords = 'SSG, Nunjucks, Gulp, JavaScript' %} | |
{% extends "layouts/layout.html" %} | |
{% block content %} | |
<div id="content"> | |
<div class="container"> | |
<h1>Hello World!</h1> | |
</div> | |
</div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="/css/style.css" /> | |
<title>My site | {{ page_name }}</title> | |
<meta name="keywords" content="{{ SEO_keywords }}"> |
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
<?php | |
chdir("slides"); | |
$slides = explode("\n", shell_exec("ls")); | |
foreach ($slides as $slide) { | |
echo $slide; | |
if ($slide) { | |
chdir("$slide"); | |
shell_exec("mv $slide.html index.html"); | |
chdir(".."); |
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
# | |
# Creating a range() emulator for my big Bro | |
# | |
# | |
# Mens Let's define a function where the magic happens | |
# @param: num => integer | |
# @returns: range | |
# |
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
import glob, re, os | |
for filename in glob.glob('/Users/your-name/Documents/presentation/*.jpg'): | |
new_name = filename.replace("slide", "slide-") | |
print filename | |
print new_name | |
os.rename(filename, new_name) |