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
{% comment %} | |
* | |
* List Archive by Year | |
* | |
{% endcomment %} | |
<section id="archive"> | |
<h3>This year's posts</h3> | |
{%for post in site.posts %} | |
{% unless post.next %} | |
<ul class="this"> |
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 class="no-js" lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Phlow</title> | |
<style> | |
body { | |
background: #222; | |
color: #fabb00; |
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 class="no-js" lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Startseite</title> | |
<link href='http://fonts.googleapis.com/css?family=Roboto:900,300,700' rel='stylesheet' type='text/css'> | |
<style type="text/css"> |
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
{% comment %} | |
* | |
* This loop loops through a collection called `collection_name` | |
* and sorts it by the front matter variable `date` and than filters | |
* the collection with `reverse` in reverse order | |
* | |
* To make it work you first have to assign the data to a new string | |
* called `sorted`. | |
* | |
{% endcomment %} |
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
{% comment %} | |
# | |
# Loop through all pages of all collections | |
# | |
{% endcomment %} | |
{% for c in site.collections %} | |
{% assign docs=c[1].docs %} | |
{% for doc in docs %} | |
// do something | |
{% endfor %} |
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
/* | |
There's a better tool https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ | |
MySQL Queries When Moving WordPress | |
To use this snippet, you have to: | |
1. Change the table prefix according your installation. In the example it's: wp_ | |
2. Change http://old-domain.com to your old domain. |
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
# | |
# 1. Download file › batch_download.sh | |
# 2. Edit file › URLs for wget to download | |
# 3. With -O you can rename the output file | |
# 4. Change permissions of file $ chmod 755 batch_download.sh | |
# 5. Start the batch $ ./batch_download.sh | |
# | |
wget https://archive.org/compress/kpu008 -O kpu008.zip | |
wget https://archive.org/compress/kpu009 -O kpu009.zip |
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
# | |
# Rename multiple files and replace name with number and prefix | |
# %02 › digits of numbers (increase when lots of files) | |
# | |
# counter=1 | |
# for i in *.* | |
# do new=$(printf "%02d.jpg" "$counter") | |
# mv -- "$i" "screenshot-realaudio-$new" | |
# let counter=counter+1 | |
# done |
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
# Rename file and replace OLDTEXT with NEWTEXT | |
# for filename in *.jpg; do mv "$filename" "${filename//OLDTEXT/NEWTEXT}"; done | |
# replace large with nothing | |
for filename in *.jpg; do mv "$filename" "${filename//large/}"; done | |
for filename in *.xml; do mv "$filename" "${filename//_meta.xml/.md}"; done |
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
# This script fetches WordPress plus some plugins with Wget, | |
# extracts everything, removes clutter and moves plugins into | |
# the right places. | |
# | |
# Option -e prints escape sequences like breaks \n | |
# | |
reset='\x1B[0m' | |
green='\x1b[0;32m' | |
yellow='\x1b[0;33m' |
OlderNewer