@ -0,0 +1,12 @@
|
||||
+++ |
||||
Title = |
||||
Author = "Unknown" |
||||
Categories = [] |
||||
Tags = [] |
||||
Date = |
||||
Truncated = true |
||||
Draft = false |
||||
+++ |
||||
tl;dr |
||||
<!--more--> |
||||
content |
||||
@ -0,0 +1,30 @@
|
||||
title = "Hagfi.sh" |
||||
baseURL = "https://hagfi.sh/" |
||||
languageCode = "en-us" |
||||
theme = "redlounge" |
||||
metaDataFormat = "yaml" |
||||
googleAnalytics = "UA-124890410-1" |
||||
disqusShortname = "hagfish" |
||||
|
||||
[params] |
||||
sidebartitle = "Hagfi.sh" |
||||
sidebartagline = "A devops guide to the galaxy" |
||||
|
||||
[mediaTypes] |
||||
[mediaTypes."application/json"] |
||||
suffixes = ["json"] |
||||
|
||||
#[outputs] |
||||
# home = ["HTML", "JSON"] |
||||
|
||||
#[[menu.main]] |
||||
# name = "Administration" |
||||
# url = "/categories/administration" |
||||
|
||||
#[[menu.main]] |
||||
# name = "Development" |
||||
# url = "/categories/development" |
||||
|
||||
#[[menu.main]] |
||||
# name = "Tools" |
||||
# url = "/categories/tools" |
||||
@ -0,0 +1,82 @@
|
||||
--- |
||||
Title: "Mount with automount (autofs)" |
||||
Author: "Kristof Vandam" |
||||
Categories: [ "administration" ] |
||||
Tags: [ "linux", "data", "mount", "shares" ] |
||||
Date: 2018-11-09T10:08:15+02:00 |
||||
Truncated: true |
||||
Draft: false |
||||
--- |
||||
Automagically mount remote directories on login. |
||||
<!--more--> |
||||
## Install the required pakages |
||||
|
||||
```.language-command |
||||
sudo yum -y install autofs |
||||
``` |
||||
|
||||
## Create the entry file |
||||
|
||||
the mapper file is a file where we specify the directory where all our mounts should be placed. |
||||
|
||||
This file should be stored in */etc/auto.master.d*, note that the extension is required to be *.autofs* |
||||
|
||||
for example: */etc/auto.master.d/home.autofs* |
||||
|
||||
```.language-command |
||||
/home/guests /etc/auto.home |
||||
|
||||
``` |
||||
|
||||
The value for */home/guests* is the file where we specify our mount options. |
||||
|
||||
**Note**: Make sure the */home/guests* directory exists, if not create it with: |
||||
|
||||
```.language-command |
||||
mkdir /home/guests |
||||
``` |
||||
|
||||
## Create the mapper file |
||||
|
||||
We earlier specified where our map file should be stored (*/etc/auto.home*), create this file. |
||||
|
||||
Say we want to auto mount the home directories stored on **serverA** on /home/guests/[*USER*] when [*USER*] logs in. |
||||
|
||||
```.language-command |
||||
* -rw,sync serverA:/home/guests/& |
||||
``` |
||||
|
||||
* The wildcards task is to create the directory based on the users homedirectory on serverA (specified with **&**) |
||||
* We give option like: read/write and sync |
||||
* As last param we have to say where we want to mount to, again, the **&** is dynamic and maps to the logged in user. |
||||
|
||||
## Enable and start the service |
||||
|
||||
```.language-command |
||||
sudo systemctl enable autofs |
||||
sudo systemctl start autofs |
||||
``` |
||||
|
||||
## Wrapping up |
||||
|
||||
Log in as a user, and check if the mount is present as expected. |
||||
|
||||
```.language-command |
||||
df -h |
||||
``` |
||||
|
||||
Should output something like: |
||||
|
||||
```.language-command |
||||
Filesystem Size Used Avail Use% Mounted on |
||||
/dev/xvda1 8.0G 5.6G 2.5G 70% / |
||||
devtmpfs 224M 0 224M 0% /dev |
||||
tmpfs 244M 0 244M 0% /dev/shm |
||||
tmpfs 244M 41M 204M 17% /run |
||||
tmpfs 244M 0 244M 0% /sys/fs/cgroup |
||||
tmpfs 49M 0 49M 0% /run/user/1000 |
||||
tmpfs 49M 0 49M 0% /run/user/0 |
||||
/serverA:/home/guests/user1 200M 0 200M 0% /home/guests/user1 |
||||
``` |
||||
|
||||
Note the last line where we see that the mount is present |
||||
@ -0,0 +1,76 @@
|
||||
--- |
||||
Title: Bash Tips & Tricks |
||||
date: 2018-11-11T16:01:15+01:00 |
||||
Author: Olivier De Ram |
||||
Draft: false |
||||
Categories: |
||||
- administration |
||||
- development |
||||
Tags: |
||||
- bash |
||||
- script |
||||
Truncated: true |
||||
--- |
||||
Usefull bash tips & tricks |
||||
<!--more--> |
||||
|
||||
### Usefull CLI shortcuts: |
||||
Shortcut | Description |
||||
------------- | ------------- |
||||
Ctrl+a | Jump to the beginning of the command line. |
||||
Ctrl+e | Jump to the end of the command line. |
||||
Ctrl+u | Clear from the cursor to the beginning of the command line. |
||||
Ctrl+k | Clear from the cursor to the end of the command line. |
||||
Ctrl+Left Arrow | Jump to the beginning of the previous word on the command line. |
||||
Ctrl+Right Arrow | Jump to the end of the next word on the command line. |
||||
Ctrl+r | Search the history list of commands for a pattern. |
||||
Esc + . | Copy the last word of the previous command on the current command line where the cursor is |
||||
|
||||
### Redirect output: |
||||
|
||||
Command | result |
||||
--- | --- |
||||
`> file` | redirect stdout to overwrite a file |
||||
`>> file` | redirect stdout to append to a file |
||||
`2> file` | redirect stderr to overwrite a file |
||||
`2> /dev/null` | discard stderr error messages by redirecting to /dev/null |
||||
`&> file` _(OR `> file 2>&1`)_ | redirect stdout and stderr to overwrite the same file |
||||
`&>>` _(OR `>> file 2>&1`)_ | redirect stdout and stderr to append to the same file |
||||
|
||||
### Create a function: |
||||
It's straightforward, use function to create a function, give it a usefull short name and put the statemants between curly brackets. |
||||
Use $1 for the first argument, $2 for the second argument and so on... |
||||
|
||||
``` bash |
||||
function <name> { |
||||
<bashcommands> |
||||
} |
||||
``` |
||||
|
||||
For example the function logsearch which searches for the given string whitin all logfiles in the current directory: |
||||
|
||||
``` bash |
||||
function logsearch { |
||||
zgrep $1 ./*log |
||||
} |
||||
``` |
||||
|
||||
### Short scripts: |
||||
|
||||
* Loop every file in path: |
||||
|
||||
``` bash |
||||
for F in /path/to/files/*; |
||||
do |
||||
echo "Files $F"; |
||||
done |
||||
``` |
||||
|
||||
* Loop file line per line: |
||||
|
||||
``` bash |
||||
while read LINE; |
||||
do |
||||
echo $LINE; |
||||
done < file.txt |
||||
``` |
||||
@ -0,0 +1,49 @@
|
||||
--- |
||||
Title: "Changing boot targets" |
||||
Author: "Kristof Vandam" |
||||
Categories: [ "administration" ] |
||||
Tags: [ "linux", "security", "boot" ] |
||||
Date: 2018-11-09T10:08:15+02:00 |
||||
Truncated: true |
||||
Draft: false |
||||
--- |
||||
Switch between run levels / environments. |
||||
<!--more--> |
||||
# Changing boot targets |
||||
|
||||
## On the fly |
||||
|
||||
Goto a graphical environment |
||||
|
||||
```.language-command |
||||
systemctl isolate graphical.target |
||||
``` |
||||
|
||||
Goto a text based environment |
||||
|
||||
```.language-command |
||||
systemctl isolate multi-user.target |
||||
``` |
||||
|
||||
## Permanently change environments |
||||
|
||||
Graphical environment |
||||
|
||||
```.language-command |
||||
systemctl set-default graphical.target |
||||
``` |
||||
|
||||
Text based environment |
||||
|
||||
```.language-command |
||||
systemctl set-default multi-user.target |
||||
``` |
||||
|
||||
## Set target on boot |
||||
|
||||
1. Interrupt the bootloader (GRUB) and edit the kernel entry before booting. Press *e* to edit the entry |
||||
2. Goto the line that starts with *linux16* suffix the line with your desired target as followed: |
||||
|
||||
```.language-command |
||||
systemd.unit=rescue.target |
||||
``` |
||||
@ -0,0 +1,125 @@
|
||||
--- |
||||
author: Olivier De Ram |
||||
date: 2018-08-25T22:08:15+02:00 |
||||
draft: false |
||||
title: Let's Encrypt |
||||
--- |
||||
|
||||
## Let's Encrypt: |
||||
|
||||
* Aanmaken / vernieuwen certificaat: |
||||
|
||||
``` |
||||
/opt/letsencrypt/letsencrypt-auto certonly |
||||
--expand |
||||
---email support@domain.tld |
||||
--agree-tos |
||||
--webroot |
||||
-w /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
``` |
||||
|
||||
``` |
||||
/bin/certbot |
||||
--text |
||||
--agree-tos |
||||
--non-interactive |
||||
certonly |
||||
-a webroot |
||||
--webroot-path /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
``` |
||||
|
||||
`--dry-run` om het aanmaken te testen. |
||||
|
||||
### Apache / httpd |
||||
* (1) Voeg volgende regels toe aan de apache config: |
||||
|
||||
``` |
||||
Alias /.well-known /var/www/vhosts/letsencrypt/.well-known |
||||
<Directory /var/www/vhosts/letsencrypt/.well-known> |
||||
order allow,deny |
||||
allow from all |
||||
satisfy any |
||||
</Directory> |
||||
``` |
||||
|
||||
* Of (2) voeg volgende regels toe aan .htaccess: |
||||
|
||||
|
||||
``` |
||||
<IfModule mod_rewrite.c> |
||||
RewriteEngine on |
||||
#Allow Let's Encrypt SSL renewal |
||||
RewriteRule ^.well-known/ - [L,NC] |
||||
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ |
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
||||
``` |
||||
|
||||
* Combineer Basic Auth met Let's Encrypt: |
||||
_Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST\_URI)_ |
||||
|
||||
``` |
||||
<Directory /var/www/vhosts/WEB/ROOT> |
||||
AuthType Basic |
||||
AuthName protected |
||||
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd |
||||
require valid-user |
||||
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# |
||||
</Directory> |
||||
``` |
||||
|
||||
### Nginx |
||||
* Voeg volgende regels toe aan Nginx |
||||
|
||||
``` |
||||
location /.well-known { |
||||
root /var/www/vhosts/WEB/ROOT; |
||||
index index.html index.htm index.php; |
||||
} |
||||
``` |
||||
|
||||
- |
||||
|
||||
|
||||
* Controleer DNS lijst domeinen: |
||||
|
||||
``` |
||||
while read LINE; |
||||
do |
||||
echo $LINE >> list_processed.txt && dig +short @9.9.9.9 $LINE >> list_processed.txt; |
||||
done < list.txt |
||||
``` |
||||
|
||||
* (WIP) |
||||
|
||||
``` |
||||
#!/bin/bash |
||||
|
||||
#IP=<%= @default_ipadress %> |
||||
IP=$(dig +short @9.9.9.9 $(hostname)) |
||||
FILE=$1 |
||||
|
||||
while read LINE |
||||
do |
||||
CHK=$(dig +short @9.9.9.9 $LINE) |
||||
if $IP -eq $CHK |
||||
echo "$LINE|$CHK" >> /tmp/le-ok |
||||
elif |
||||
echo "$LINE|$CHK" >> /tmp/le-nok |
||||
fi |
||||
done < $FILE |
||||
|
||||
echo "Domains OK:" |
||||
echo /tmp/le-ok | column |
||||
echo "-------------------------------" |
||||
echo "Domains NOT OK:" |
||||
echo /tmp/le-nok | column |
||||
|
||||
rm -rf /tmp/le-ok |
||||
rm -rf /tmp/le-nok |
||||
``` |
||||
@ -0,0 +1,126 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- administration |
||||
Date: 2018-08-23T22:08:15+02:00 |
||||
Draft: false |
||||
Tags: |
||||
- encryption |
||||
- security |
||||
- disk |
||||
- partition |
||||
Title: Luks Encryption |
||||
Truncated: true |
||||
--- |
||||
|
||||
Create an encrypted partition that will automatically mount at boot. |
||||
<!--more--> |
||||
|
||||
Sometimes it's nice to have encryption, sometimes it's mandatory, either way, there are a couple of thing you should take |
||||
in mind. Most solutions you find are at disk level but these have some pro's and con's. |
||||
|
||||
PRO's | CON's |
||||
-------------------------------------|--------------------------------------------------------------------------------------- |
||||
Every application can work with it | Data is only secured from physical theft |
||||
No extra development required | Can cause some overhead, as everything goes through encryption/decryption, everything |
||||
|
||||
There are also a couple of choisen you can make implementing LUKS, you could create a LVM layer on top of a LUKS partition or, what |
||||
we are doing in this guide, add a LUKS encrypted mount on top of a LVM stack. The latter allows you to automatically mount |
||||
the encrypted disk after or at boot time. |
||||
|
||||
## Add a new disk (LVM) |
||||
|
||||
This is unrelated to encrypting the disk, but in our setup we started by adding a new disk to the server. |
||||
|
||||
The commands below are just some I often use as a group. From lines 1 to 3 you can just copy/paste. Line 1 makes sure a rescan |
||||
is triggered to detect the newly added disk. 2 & 3 create some variables, which can be checked and used later. Make sure the output |
||||
of these are what you expected. You can echo them as shown on 4 & 5. |
||||
|
||||
Create a Physical Volume and extend the Volume Group 'centos' |
||||
```.language-command.line-numbers |
||||
root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo "- - -" > $i/scan; done |
||||
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d "[" -f2|cut -d "]" -f1) |
||||
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') |
||||
root@server:/dev/centos # echo ${NEWDISK} |
||||
sdd |
||||
root@server:/dev/centos # echo ${VGROUP} |
||||
centos |
||||
root@server:/dev/centos # pvcreate /dev/${NEWDISK} |
||||
Physical volume "/dev/sdd" successfully created. |
||||
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} |
||||
Volume group "centos" successfully extended |
||||
``` |
||||
|
||||
## Create a logical volume (LVM) |
||||
|
||||
Add a Logical Volume named 'encrypted' to the Volume Group 'centos'. |
||||
```.language-command |
||||
root@server:/dev/centos # lvcreate -L 15G -n encrypted centos |
||||
Logical volume "encrypted" created. |
||||
``` |
||||
|
||||
## Encrypt the partition |
||||
|
||||
Ok, the fun parts starts here (**CAUTION** before continueing make sure there is no important data on */dev/centos/encrypted*, this will be wiped). We encrypt the Logical Volume with the first command. A passphrase is required (see it as a backup) |
||||
LUKS can contain up to 5 different passwords. In a future section we add a second, more complex, password to use as key on boot. |
||||
Hold tight. |
||||
|
||||
After the first command (the actual formatting of the partition) we need to 'open' the partition. By opening we mean creating a new disk, but you |
||||
should notice there is a password required to do so. Use the password you just created. |
||||
```.language-command |
||||
root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted |
||||
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted |
||||
``` |
||||
|
||||
## Create a mountpoint |
||||
|
||||
Before you can use the encrypted partition you should mount it. Do it like you always do it. Create a directory to mount to and mount */dev/mapper/luks-encrypted* with *mount*. |
||||
```.language-command |
||||
root@server:/dev/mapper # mkdir /encrypted |
||||
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted |
||||
``` |
||||
From here on you are actually done, if you want to type password manually on every boot. I highly doubt you want that so lets go on. |
||||
(It is ofourse more safe to do so). |
||||
|
||||
## Create a key (to auto-mount the encrypted disk) |
||||
|
||||
Create a key-file we can add to */etc/crypttab*, any random string will do, but we create it with */dev/urandom*. Make sure to set some strict permissions. |
||||
```.language-command |
||||
root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 |
||||
root@server:/dev/mapper # chmod 0400 /root/lukskey |
||||
``` |
||||
|
||||
## Unmount and add the key |
||||
|
||||
Add the key you just created to make it valid for LUKS, but first unmount the mount and close the vault. |
||||
```.language-command |
||||
root@server:/ # umount /encrypted |
||||
root@server:/ # cryptsetup luksClose luks-encrypted |
||||
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey |
||||
``` |
||||
|
||||
## Get UUID |
||||
|
||||
Get the UUID of the disk, using the UUID to mount disk is a more solid solution than using the disknames (/dev/sd*). These disknames **CAN** change, the UUID cannot. |
||||
```.lang-command |
||||
root@server:/ # blkid /dev/mapper/centos-encrypted |
||||
/dev/mapper/centos-encrypted: UUID="0dab9a5c-1870-478d-8d74-226eeb512f78" TYPE="crypto_LUKS" |
||||
``` |
||||
|
||||
## Auto-mount LUKS (edit /etc/crypttab) |
||||
|
||||
Add a entry to the */etc/crypttab*, see it as the */etc/fstab* file. Just as fstab crypttab will automount the defined entries. |
||||
```.language-command |
||||
root@server:/ # blkid /dev/mapper/centos-encrypted |
||||
/dev/mapper/centos-encrypted: UUID="0dab9a5c-1870-478d-8d74-226eeb512f78" TYPE="crypto_LUKS" |
||||
``` |
||||
|
||||
## Auto-mount LUKS (edit /etc/cypttab) |
||||
|
||||
```.language-bash |
||||
luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks |
||||
``` |
||||
|
||||
## Check your work |
||||
|
||||
Congrats, this should be it, reboot and make sure the disk is mounted automatically. |
||||
@ -0,0 +1,90 @@
|
||||
--- |
||||
author: Olivier De Ram |
||||
date: 2018-08-25T22:08:15+02:00 |
||||
draft: false |
||||
title: MySQL Tuner |
||||
--- |
||||
|
||||
## MySQL Tuner ## |
||||
|
||||
| WAARDE | ACTIE |
||||
------------- | ------------- |
||||
`query_cache_size` | AFBLIJVEN |
||||
`table_cache ` | AFBLIJVEN _(maximumwaarde = 64)_ |
||||
`table_open_cache` | AFBLIJVEN |
||||
`join_buffer_size` | Verhogen indien `Joins performed without indexes++` |
||||
`tmp_table_size` | Verhogen = `max_heap_table_size` |
||||
`max_heap_table_size` | Verhogen `= tmp_table_size` |
||||
`query_cache_type` | `=1` indien `=0` |
||||
|
||||
|
||||
mysql tuning improvements |
||||
`table_cache` NOOIT hoger dan 64 |
||||
Sudo vim /etc/my.cnf |
||||
query_cache_size' => '256M’, |
||||
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. |
||||
'open_files_limit' => '4096', |
||||
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. |
||||
'join_buffer_size' => '256K’, |
||||
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. |
||||
Minimumgrootte van buffer voor index en table scans. |
||||
|
||||
------ |
||||
|
||||
'max_heap_table_size' => '32M’, |
||||
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. |
||||
Max grootte van user-created memory tables |
||||
These 2 need to be the same size!!! |
||||
'tmp_table_size' => '32M’, |
||||
The maximum size of internal in-memory temporary tables. |
||||
Max grootte van interne in-memory tijdelijke tabellen |
||||
|
||||
-------- |
||||
|
||||
table_cache=64 (maximumwaarde!!) |
||||
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it'll keep opening and closing tables. |
||||
Maximumwaarde voor caching van geopende tabellen. |
||||
thread_cache_size=4 |
||||
How many threads the server should cache for reuse. |
||||
Aantal threads dat de server kan cachen voor hergebruik. |
||||
'innodb_buffer_pool_size' => '1G', |
||||
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB. |
||||
|
||||
Sudo service mysql/mariadb reload (restart enkel onder toezicht) |
||||
|
||||
|
||||
* `query_cache_*`: |
||||
|
||||
|
||||
`query_cache_type` |
||||
Needs to be set to 1 to enable caching. |
||||
`query_cache_size` |
||||
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes. |
||||
`query_cache_limit` |
||||
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet. |
||||
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden. |
||||
`table_open_cache` |
||||
Indicates the maximum number of tables the server keeps open |
||||
|
||||
________ |
||||
`innodb_buffer_pool_instances=2` |
||||
_Enables the use of multiple threads for innodb._ |
||||
|
||||
`query_cache_type=1` |
||||
_Enables query caching._ |
||||
|
||||
`join_buffer_size=1024K` |
||||
_Increased the buffer size for non-indexed joins._ |
||||
|
||||
`tmp_table_size=64M && max_heap_table_size=64M` |
||||
_Increased the size for temporary tables._ |
||||
|
||||
`join_buffer_size` |
||||
_Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd._ |
||||
|
||||
`max_heap_table_size & tmp_table_size` |
||||
_De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd._ |
||||
|
||||
`thread_cache_size` |
||||
_Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd._ |
||||
@ -0,0 +1,50 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- administration |
||||
Date: 2018-10-03T10:08:15+02:00 |
||||
Draft: true |
||||
Tags: |
||||
- linux |
||||
- security |
||||
- selinux |
||||
Title: Selinux 101 |
||||
Truncated: true |
||||
--- |
||||
|
||||
A brief overview about selinux, what can it do and how to manage. |
||||
<!--more--> |
||||
## Context Types |
||||
|
||||
source context (scontext), for example processes |
||||
destination context (tcontenxt), for example, files, directories, ports |
||||
|
||||
semanage |
||||
|
||||
-a add |
||||
-d delete |
||||
-l list |
||||
|
||||
-t context type |
||||
|
||||
### Examples |
||||
#### Add a default context to a directory |
||||
|
||||
## Booleans |
||||
setsebool |
||||
getsebool |
||||
|
||||
## Debugging |
||||
|
||||
### /var/log/audit/audit.log |
||||
avc: denied |
||||
access vector control |
||||
|
||||
### /var/log/messages |
||||
setroubleshoot |
||||
more human readable errors |
||||
-> only available when setroubleshoot-server package is installed |
||||
|
||||
### sealert |
||||
/var/log/messages suggest running a sealert command for more information |
||||
suggests fixes! :) |
||||
@ -0,0 +1,32 @@
|
||||
--- |
||||
title: "SELinux" |
||||
date: 2018-011-11T16:01:15+01:00 |
||||
draft: true |
||||
--- |
||||
|
||||
# SELinux |
||||
|
||||
Security Enhanced Linux is a build in security feature that mostly known to block what you as a sysadmin are trying to do. |
||||
Therefore, most online how-to's include a line saying something like: |
||||
_"Perform `sed -i s/enforcing/permisive/ /etc/selinux/config` to set the correct SELinux permissions"_ |
||||
It doesn't, let us introduce how it should be done. |
||||
|
||||
### SELinux states |
||||
SELinux knows 3 states: |
||||
|
||||
State | Explanation |
||||
--- | --- |
||||
Enforcing (default) | Logs and block all actions not allowed by current contexts |
||||
Permissive | Only logs all actions not allowed by current contexts |
||||
Disabled | Does nothing (disabled), requires a reboot to (un)set |
||||
|
||||
|
||||
### SELinux commands |
||||
Command | Explanation |
||||
--- | --- |
||||
`getenforce` | Get current SELinux mode |
||||
`setenforce` | Set new SELinux mode (0 for off, 1 for on). _(Will be overwritten by reboot)_ |
||||
`sestatus` | Get current status, default config and more basic info |
||||
`chcon` | Change the SELinux context for a file |
||||
`restorecon` | Reset the SELinux context for a file to match context database |
||||
`semanage` | Extansion in Python to manage the SELinux contexts |
||||
@ -0,0 +1,26 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- administration |
||||
Date: 2018-11-05T22:13:49+02:00 |
||||
Draft: false |
||||
Tags: |
||||
- network |
||||
- networking |
||||
- interfaces |
||||
- ifconfig |
||||
Title: Troubles with interfaces after a VM clone |
||||
Truncated: true |
||||
--- |
||||
|
||||
Remapping interfaces and their MAC address. |
||||
<!--more--> |
||||
Often, when you clone a VM you could stumble against errors like: |
||||
|
||||
```.language-command.line-numbers |
||||
[FAILED] Device eth0 does not seem to be present, delaying initialization |
||||
``` |
||||
|
||||
You could change your network configuration to match the correct interface or let Linux reread the available interfaces |
||||
|
||||
*/etc/udev/rules.d/70-persistent-net.rules* holds the configuration of available devices. Make sure that the MAC address is correct and that the name maches your configuration |
||||
@ -0,0 +1,96 @@
|
||||
--- |
||||
author: Olivier De Ram |
||||
date: 2018-08-25T22:08:15+02:00 |
||||
draft: false |
||||
title: Windows troubleshooting |
||||
--- |
||||
|
||||
## Windows troubleshooting |
||||
VRAGEN: |
||||
+ openen vanuit ticketing, wachtwoord en gebruiker |
||||
+ custom even viewer view? |
||||
+ test server? |
||||
|
||||
|
||||
### *EventViewer* |
||||
run: eventvwr |
||||
|
||||
- custom views |
||||
- windows |
||||
- application (non windows standard, puppet, vmware, mssql, ...) |
||||
- security, aan en afmelden |
||||
- set-up: updates en installatie verwijderen programma's |
||||
- system: OS meldingen |
||||
- application and services: diep graven |
||||
|
||||
|
||||
--> Filter Log: |
||||
|
||||
- logged (date range) |
||||
- event level |
||||
- event source |
||||
- event ID: 99,-1024,-4634 |
||||
|
||||
rechtsonderaan > event copy > copy as text |
||||
|
||||
|
||||
### *PowerShell* |
||||
``` PowerShell |
||||
$first = |
||||
$last = |
||||
get-eventlog -Logname system - |
||||
``` |
||||
|
||||
``` PowerShell |
||||
`get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` |
||||
``` |
||||
|
||||
|
||||
|
||||
### *Task Viewer* |
||||
- tasks |
||||
- users |
||||
- performance (indien gecrasht, bevestigen anders is het netwerk) |
||||
|
||||
### *Resource monitor* |
||||
(task manager > performance > open resouce monitor) |
||||
|
||||
Overview > CPU (ovenste tab) app aanvinken --> filtert alles |
||||
|
||||
### *Netstat* |
||||
`netstat -abo > C:\temp\log.txt` |
||||
|
||||
### *Chocolate* |
||||
C:\ProgramData\chocolatey\bin\Procmon.exe |
||||
--> selecteer lijn+kolom > exclude 'name' (=grep -v) / include 'name' (=grep) |
||||
|
||||
### *Usefull programs* |
||||
- TreeView |
||||
- VBluescreenviewer |
||||
- Sysinternals |
||||
- Zabbix |
||||
- VMware events |
||||
- BareTail |
||||
- choco install |
||||
- choco list -lo (view choco installed programs) |
||||
- telnet 12.34.56.78 900 |
||||
- powershell: `stop service 'name'` |
||||
|
||||
### *EventID's* |
||||
- Event ID 6005: “The event log service was started.” This is synonymous to system startup. |
||||
- Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown. |
||||
- Event ID 6008: "The previous system shutdown was unexpected." Records that the system started after it was not shut down properly. |
||||
- Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time. |
||||
- Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. |
||||
Add to that a couple more from the Server Fault answers listed in my OP: |
||||
|
||||
- Event ID 1074: "The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z." Indicates that an application or a user initiated a restart or shutdown. |
||||
- Event ID 1076: "The reason supplied by user X for the last unexpected shutdown of this computer is: Y." Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence. |
||||
|
||||
|
||||
### *PowerShell* |
||||
``` PowerShell |
||||
$filter = "*abbix*" |
||||
get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } |
||||
``` |
||||
|
||||
@ -0,0 +1,201 @@
|
||||
+++ |
||||
Title = "Yet Another Arch Guide" |
||||
Author = "Kristof Vandam - Adam Verbeeck" |
||||
Categories = [ "administration" ] |
||||
Tags = [ "arch" ] |
||||
Date = 2018-11-30T10:08:22+02:00 |
||||
Truncated = true |
||||
Draft = false |
||||
+++ |
||||
Setting up Arch with other bells and whistles. |
||||
<!--more--> |
||||
## Target |
||||
Lenovo X240 |
||||
i5-4300U |
||||
8GB DDR3 RAM |
||||
500GB SSD |
||||
|
||||
## Pre-requirements |
||||
* Bootable USB with Arch installer installed |
||||
* Cabled connection |
||||
* Device connected to a power supply |
||||
|
||||
## First things first |
||||
### Keyboard layout |
||||
|
||||
```.language-command |
||||
loadkeys [keyboard-identifier] |
||||
``` |
||||
|
||||
### Check your internet connection |
||||
|
||||
```.language-command |
||||
ping archlinux.org |
||||
``` |
||||
|
||||
### Set timezone |
||||
|
||||
```.language-command |
||||
timedatectl set-timezone Europe/Brussels |
||||
``` |
||||
|
||||
## Prepairing your disks |
||||
### Check which disks you have available |
||||
```.language-command |
||||
fdisk -l |
||||
``` |
||||
|
||||
### Partitioning |
||||
|
||||
Device your disk into individual partitions: |
||||
|
||||
1. boot |
||||
2. arch |
||||
3. windows |
||||
|
||||
#### Some letters we gonna use |
||||
|
||||
* **p** show your partition |
||||
* **n** new partition |
||||
* **a** set the bootflag |
||||
* **t** set the type |
||||
* **L** show available types |
||||
* **w** write the changes |
||||
|
||||
#### The actual work |
||||
|
||||
```.language-command |
||||
fdisk [your-disk] |
||||
``` |
||||
|
||||
press **n** to create a new partition, the first prompt asks the type of partition, use **p** for Primary |
||||
Partition number, enter. |
||||
first sector, enter. |
||||
goto 'Specify your sizes'. |
||||
|
||||
#### Specify your sizes |
||||
+[SIZE][TGMK] |
||||
|
||||
#### Set the bootflag |
||||
A partition needs a bootflag for the MBR know which partition use at startup |
||||
|
||||
#### Set the types |
||||
Use **t** to set the type: |
||||
|
||||
**83** for boot *(linux)* |
||||
**8e** for arch *(lvm)* |
||||
**7** for windows *(HPFS/NTFS/exFAT)* |
||||
|
||||
### LVM |
||||
|
||||
```.language-command |
||||
pvcreate /dev/sda2 |
||||
vgcreate vg0 /dev/sda2 |
||||
lvcreate -L +2G -n swap vg0 |
||||
lvcreate -l 100%FREE -n swap vg0 |
||||
``` |
||||
|
||||
### Filesystems |
||||
|
||||
```.language-command |
||||
mkswap /dev/mapper/vg0-swap |
||||
mkfs.ext4 /dev/sda1 |
||||
mkfs.xfs /dev/mapper/vg0-root |
||||
``` |
||||
|
||||
### Mount your disks and strap your seatbelt, we gonna pacstrap |
||||
|
||||
```.language-command |
||||
mount /dev/mapper/vg0-root /mnt |
||||
mkdir /mnt/boot |
||||
mount /dev/sda1 /mnt/boot |
||||
``` |
||||
|
||||
```.language-command |
||||
pacstrap /mnt base base-devel vim bash-completion networkmanager |
||||
``` |
||||
|
||||
### Make sure it boots! |
||||
genfstab -U /mnt >> /mnt/etc/fstab |
||||
|
||||
### making it yours |
||||
arch-chroot /mnt |
||||
|
||||
#### Time, Date, Region |
||||
```.language-command |
||||
ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime |
||||
hwclock --systohc |
||||
locale-gen |
||||
``` |
||||
|
||||
/etc/locale.conf |
||||
```.language-command |
||||
LANG=en_US.UTF-8 UTF-8 |
||||
``` |
||||
|
||||
/etc/vconsole.conf |
||||
```.language-command |
||||
KEYMAP=be-latin1 |
||||
``` |
||||
|
||||
/etc/hostname |
||||
```.language-command |
||||
myhostname |
||||
``` |
||||
|
||||
/etc/hosts |
||||
```.language-command |
||||
127.0.0.1 localhost |
||||
::1 localhost |
||||
127.0.0.1 myhostname.localdomain myhostname |
||||
``` |
||||
|
||||
```.language-command |
||||
passwd |
||||
``` |
||||
|
||||
### Grub |
||||
|
||||
```.language-command |
||||
pacman -S grub |
||||
grub-install /dev/sda |
||||
grub-mkconfig > /boot/grub/grub.cfg |
||||
``` |
||||
*Ignore warnings* |
||||
|
||||
### fstab |
||||
Add swap to fstab |
||||
```.language-command |
||||
/dev/mapper/vg0-swap swap swap default 0 0 |
||||
``` |
||||
|
||||
Check your work by swapping the swap |
||||
```.language-command |
||||
swapoff -a |
||||
mount -a |
||||
swapon -a |
||||
free |
||||
``` |
||||
does your swap have bytes? |
||||
|
||||
### LVM can't bot |
||||
Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf |
||||
|
||||
add *lvm2* to the HOOKS Array before filestystems |
||||
```.language-command |
||||
... |
||||
HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck) |
||||
... |
||||
``` |
||||
|
||||
```.language-command |
||||
mkinitcpio -p linux |
||||
``` |
||||
|
||||
### Cross fingers - reboot |
||||
|
||||
### Enable services |
||||
```.language-command |
||||
systemctl enable NetworkManager |
||||
systemctl start NetworkManager |
||||
``` |
||||
@ -0,0 +1,254 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- development |
||||
Date: 2018-08-29T22:44:46+02:00 |
||||
Draft: false |
||||
Tags: |
||||
- vue |
||||
- vuejs |
||||
- prism |
||||
- prismjs |
||||
- hugo |
||||
- javascript |
||||
- js |
||||
- json |
||||
Title: Live Search With HUGO |
||||
Truncated: true |
||||
--- |
||||
|
||||
HUGO is static, that's a fact. How can I implement a live search? Searching the internet provided me only solutions |
||||
that require a page refresh, this time of age performance is key, so that's why I wanted a fast and fuzzy search implementation. |
||||
<!--more--> |
||||
## Research |
||||
Some this I found which helped to get there are: |
||||
|
||||
* [here](https://gohugo.io/tools/search/) *more specific* [here](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae) |
||||
* https://vuejs.org/ |
||||
* http://fusejs.io/ |
||||
* https://momentjs.com/ |
||||
* https://github.com/axios/axios |
||||
|
||||
## Create a JSON object containing all articles |
||||
Actually every data you want to search, in this guide (and on this website) I use the following data: |
||||
|
||||
1. Title |
||||
2. Date |
||||
3. Author |
||||
4. Tags |
||||
5. Content |
||||
|
||||
This is specified in a custom *layout*. Note the ```(dict "title" ...)``` line. You can add any data that HUGO processes (for each article). Its a list of key/values, the keys are presented between the quotes, the value as first value. |
||||
|
||||
**layouts/json/single.html** |
||||
```.language-none.line-numbers |
||||
{{- $.Scratch.Add "index" slice -}} |
||||
{{- range where .Site.Pages "Type" "not in" (slice "page" "json") -}} |
||||
{{- $.Scratch.Add "index" (dict "title" .Title "date" .Date "author" .Params.author "href" .Permalink "tags" .Params.tags "content" .Plain) -}} |
||||
{{- end -}} |
||||
{{- $.Scratch.Get "index" | jsonify -}} |
||||
``` |
||||
|
||||
Now, with this file in place the next thing to do is to create a content page, where this layout is used. This file triggers the creation of "index.json". |
||||
|
||||
**content/search.md** |
||||
```.language-yaml.line-numbers |
||||
--- |
||||
date: "2017-03-05T21:10:52+01:00" |
||||
type: "json" |
||||
url: "index.json" |
||||
--- |
||||
``` |
||||
|
||||
**Example of the data returned** |
||||
*You can checkout the json object for this website, just go to* https://hagfi.sh/index.json |
||||
```.language-json.line-numbers |
||||
[ |
||||
{ |
||||
"author": "Kristof Vandam", |
||||
"content": "HUGO is static, that\u0026rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions that require a page refresh, this time of age performance is key, so that\u0026rsquo;s why I wanted a fast and fuzzy search implementation. Research Some this I found which helped to get there are:\n https://gohugo.io/tools/search/ ", |
||||
"date": "2018-08-29T22:44:46+02:00", |
||||
"href": "http://localhost:1313/development/live-search-with-hugo/", |
||||
"tags": null, |
||||
"title": "Live Search With HUGO" |
||||
} |
||||
] |
||||
``` |
||||
|
||||
## Add the required dependencies (we use CDN's) |
||||
|
||||
Make sure the following dependencies are loaded between the head tags. We use a little trick to let the browser decide if http or https is used. These are called *Protocol-Relative URL's*. |
||||
|
||||
```.language-markup.line-numbers |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script> |
||||
<script src="//cdn.bootcss.com/fuse.js/3.2.0/fuse.min.js"></script> |
||||
``` |
||||
|
||||
## Add the actual search logic |
||||
|
||||
It's a best practice to add the JavaScript right before the closing body tags. I highly suggest checking out VueJS with Webpack, but in this case a some simple JS inside script tags will do just fine. |
||||
|
||||
I will go over each section to clarify. |
||||
|
||||
```.language-javascript.line-numbers |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
data: { |
||||
fuse: null, |
||||
search: "", |
||||
result: [], |
||||
index: [] |
||||
}, |
||||
mounted() { |
||||
|
||||
let self = this |
||||
|
||||
let options = { |
||||
shouldSort: true, |
||||
threshold: 0.6, |
||||
location: 0, |
||||
distance: 100, |
||||
maxPatternLength: 32, |
||||
minMatchCharLength: 1, |
||||
keys: [ |
||||
"title", |
||||
"author", |
||||
"date", |
||||
"content" |
||||
] |
||||
} |
||||
axios.get('/index.json') |
||||
.then(function (response) { |
||||
self.index = response.data |
||||
self.fuse = new Fuse(response.data, options); |
||||
self.result = fuse.search(""); |
||||
}) |
||||
.catch(function (error) { |
||||
console.log(error) |
||||
}) |
||||
}, |
||||
watch: { |
||||
search(nval, oval) { |
||||
if (nval.length > 0) { |
||||
this.result = this.fuse.search(nval) |
||||
} else { |
||||
this.result = [] |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
``` |
||||
|
||||
### Create the Vue instance |
||||
|
||||
When creating a new Vue instance we assign Vue to a DOM element, most of the time an ID on your body tag is used. |
||||
```.language-javascript.line-numbers |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
... |
||||
}) |
||||
``` |
||||
|
||||
### Create a data object |
||||
|
||||
This object is accesible across your DOM and Vue instance. Inside functions you can reffer to these with ```this.*```.language- |
||||
I initiated some variables like 'fuse' so it can be used inside *watch* and *methods*. |
||||
```.language-javascript.line-numbers |
||||
data: { |
||||
fuse: null, |
||||
search: "", |
||||
result: [], |
||||
index: [] |
||||
}, |
||||
``` |
||||
|
||||
### What todo when everything is ready |
||||
|
||||
The ```mounted()``` function is triggered when everything ready to start processing your custom code. *(This function used to name 'ready()')*. |
||||
We assign ```this``` to ```self``` to handle some scope issues in the axios promise. |
||||
We polulate some options for FuseJS, note that the keys array is important here. Here we specify which keys of our index.json we want to search. |
||||
The index.json file is loaded with AJAX, this way the page should not wait for content that is not required immediately. |
||||
When axios retrieves the date we create a Fuse instance (assigned to ```self.fuse``` (or ```this.fuse```)). |
||||
```.language-javascript.line-numbers |
||||
mounted() { |
||||
|
||||
let self = this |
||||
|
||||
let options = { |
||||
shouldSort: true, |
||||
threshold: 0.6, |
||||
location: 0, |
||||
distance: 100, |
||||
maxPatternLength: 32, |
||||
minMatchCharLength: 1, |
||||
keys: [ |
||||
"title", |
||||
"author", |
||||
"date", |
||||
"content" |
||||
] |
||||
} |
||||
axios.get('/index.json') |
||||
.then(function (response) { |
||||
self.index = response.data |
||||
self.fuse = new Fuse(response.data, options); |
||||
self.result = fuse.search(""); |
||||
}) |
||||
.catch(function (error) { |
||||
console.log(error) |
||||
}) |
||||
}, |
||||
``` |
||||
|
||||
### When something is entered inside the search field |
||||
|
||||
We watch for ```this.search``` to change, if it changes this function is called. Remember we set ```search: ""``` inside our data object? |
||||
If the 'nval' (New VALue) is larger than 0 characters we trigger the search function of fuse, which will return a new data set, but filtered. |
||||
This dataset is stored inside ```this.result```.language- |
||||
|
||||
If the length of 'nval' changes to 0 characters we hardcode the result to be an empty array (to prevent possible edgecases). |
||||
```.language-javascript.line-numbers |
||||
watch: { |
||||
search(nval, oval) { |
||||
if (nval.length > 0) { |
||||
this.result = this.fuse.search(nval) |
||||
} else { |
||||
this.result = [] |
||||
} |
||||
} |
||||
} |
||||
``` |
||||
|
||||
### Ok, cool, now how do I showcase the results? |
||||
|
||||
Well, it's up to you. The most important parts in this example are: |
||||
|
||||
1. Bind ```this.search``` to the input field (with ```v-model```) |
||||
2. Loop through ```this.result``` with ```v-for```, it will recreate the li tag 'for each' result item. |
||||
3. Use the result item, reffered as ```r```. |
||||
4. Links are extracted from the result item by the 'href' key and bound to the href attribute. ```:href="r.href"``` |
||||
|
||||
We use Moment.js to format the default (can be changed) HUGO date format to 'D' (Day), 'MMM' (Month, max 3 characters), 'YYYY' (Full Year). |
||||
|
||||
```.language-markup.line-numbers |
||||
<div class="search-wrapper"> |
||||
<input type="text" placeholder="Search ..." v-model="search" class="search"/> |
||||
<ul class="result-items"> |
||||
<li v-for="r of result" class="result-item"> |
||||
<div class="result-item-wrapper"> |
||||
<div class="result-item-left"> |
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator">/</span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span> |
||||
</span> |
||||
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template> |
||||
</div> |
||||
<div class="result-item-left"> |
||||
<span class="nav-item-separator">//</span><a :href="r.href" v-text="r.title"></a> |
||||
</div> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
``` |
||||
@ -0,0 +1,6 @@
|
||||
--- |
||||
date: 2017-03-05T21:10:52+01:00 |
||||
type: json |
||||
url: index.json |
||||
--- |
||||
|
||||
@ -0,0 +1,70 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- tools |
||||
- administration |
||||
Date: 2018-11-05T22:13:49+02:00 |
||||
Draft: false |
||||
Tags: |
||||
- directory |
||||
- size |
||||
- inventory |
||||
Title: 'Fatrace: Report system wide file access events' |
||||
Truncated: true |
||||
--- |
||||
|
||||
fatrace watches every file on server (except from itself and other kernel file systems). |
||||
<!--more--> |
||||
*fatrace* watches every file on server (except from itself and other kernel file systems). |
||||
|
||||
|
||||
## Install on Centos7 |
||||
Download the repo file from *fedorainfracloud.org* |
||||
|
||||
```.language-command |
||||
sudo curl https://copr.fedorainfracloud.org/coprs/ifas/fatrace/repo/epel-7/ifas-fatrace-epel-7.repo > /etc/yum.repos.d/ifas.repo |
||||
sudo yum install fatrace -y |
||||
``` |
||||
|
||||
## Usage |
||||
|
||||
Option | Description |
||||
------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------- |
||||
-c, --current-mount | Only record events on partition/mount of current directory. Without this option, all (real) partitions/mount points are being watched. |
||||
-o FILE, --output=FILE | Write events to given file instead of standard output. |
||||
-s SECONDS, --seconds=SECONDS | Stop after the given number of seconds. |
||||
-t, --timestamp | Add timestamp to events. When this option is given once, the format will be a humanreadable|hour:minute:second.microsecond |
||||
-p PID, --ignore-pid=PID | Ignore events for this process ID. Can be specified multiple times. |
||||
|
||||
### Output |
||||
|
||||
The output should look something like the following. My action was reloading this page while watching with fatrace. |
||||
|
||||
```.language-command |
||||
$ fatrace -t |
||||
12:58:20.859174 pickup(7666): CO /var/spool/postfix/maildrop |
||||
12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace |
||||
12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace/index.html |
||||
12:58:21.017572 caddy(7472): W /var/log/caddy/blog.log |
||||
12:58:21.213908 caddy(7472): CO /var/www/vhosts/blog/index.json |
||||
12:58:21.213908 caddy(7472): W /var/log/caddy/blog.log |
||||
12:58:21.305848 caddy(7472): RCO /var/www/vhosts/blog/img/favicon.png |
||||
12:58:21.305848 caddy(7472): W /var/log/caddy/blog.log |
||||
``` |
||||
|
||||
Letter | Description |
||||
---------|------------ |
||||
R | Read |
||||
W | Write |
||||
O | Open |
||||
C | Close |
||||
|
||||
Action identifiers can be combined |
||||
|
||||
## Usecases |
||||
|
||||
identifying which files are accessed by a process. |
||||
|
||||
## References |
||||
|
||||
[Manpage fatrace](http://manpages.ubuntu.com/manpages/trusty/man1/fatrace.1.html) |
||||
@ -0,0 +1,82 @@
|
||||
--- |
||||
Author: Kristof Vandam |
||||
Categories: |
||||
- tools |
||||
- administration |
||||
Date: 2018-09-17T22:18:38+02:00 |
||||
Draft: false |
||||
Tags: |
||||
- du |
||||
- ncdu |
||||
- directory |
||||
- size |
||||
- inventory |
||||
Title: 'NCDU: NCurses Disk Usage' |
||||
Truncated: true |
||||
--- |
||||
|
||||
ncdu is a command line tool to scan and calculate directory and file sizes. |
||||
<!--more--> |
||||
## Comparison with 'du' |
||||
While the initial scan is about the same as du, ncdu keeps the results in memory. This |
||||
can become handy when investigating the storage hog. You can compare the already cached |
||||
results immediately with a *\(r\)* escan. |
||||
|
||||
Also navigation is a breese. *ncdu* creates a interactive session where the arrow keys are |
||||
used to open and close directories. |
||||
|
||||
## Options |
||||
ncdu is not bloated with options, but each of these are useful and easy to remember. All these are |
||||
used inside the interactive session. |
||||
|
||||
Key | Description |
||||
----------------|--------------- |
||||
up, k | Move cursor up |
||||
down, j | Move cursor down |
||||
right/enter | Open selected directory |
||||
left, <, h | Open parent directory |
||||
n | Sort by name |
||||
s | Sort by size |
||||
C | Sort by items |
||||
d | Delete selected file or directory |
||||
t | Toggle dirs before files when sorting |
||||
g | Show percentage and/or graph |
||||
a | Toggle between apparent size and disk usage |
||||
c | Toggle display of child item counts |
||||
e | Show/hide hidden or excluded files |
||||
i | Show information about selected item |
||||
r | Recalculate the current directory |
||||
b | Spawn shell in current directory |
||||
q | Quit ncdu |
||||
|
||||
## Advanced ncdu |
||||
|
||||
### JSON for development |
||||
```.language-command |
||||
ncdu -x / -o- | jq |
||||
``` |
||||
> |
||||
* **-x** chose directory '/' |
||||
* **-o-** output to stdout |
||||
|
||||
Will create a JSON object of the current directory and all his subdirectories. This can come |
||||
handy for developing or generating reports. |
||||
|
||||
### Store result |
||||
```.language-command |
||||
ncdu -0xo- / | gzip > scan.gz |
||||
``` |
||||
> |
||||
* **-0** surpress unwanted output |
||||
* **-x** chose directory '/' |
||||
* **-o-** output to stdout |
||||
|
||||
### Use stored result |
||||
```.language-command |
||||
zcat scan.gz | ncdu -f- |
||||
``` |
||||
> |
||||
* **-f** read from stdin |
||||
|
||||
## Author |
||||
[Official Website](https://dev.yorhel.nl/ncdu/man) |
||||
@ -0,0 +1,5 @@
|
||||
{{- $.Scratch.Add "index" slice -}} |
||||
{{- range where .Site.RegularPages "Type" "not in" (slice "page" "json") -}} |
||||
{{- $.Scratch.Add "index" (dict "title" .Title "date" .Date "author" .Params.author "href" .Permalink "tags" .Params.tags "content" .Plain) -}} |
||||
{{- end -}} |
||||
{{- $.Scratch.Get "index" | jsonify -}} |
||||
@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Dont Let Your Application Interfere With Letsencrypt // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Dont Let Your Application Interfere With Letsencrypt" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</a></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/windows_troubleshooting/">Windows troubleshooting</a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/development/vue-js/">Vue Js</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,267 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Administrations // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Administrations" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="https://hagfi.sh/administration/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
<div class="posts"> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/letsencrypt/">Let's Encrypt</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Let’s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@nucleus.be --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen. |
||||
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known <Directory /var/www/vhosts/letsencrypt/.well-known> order allow,deny allow from all satisfy any </Directory> Of (2) voeg volgende regels toe aan . |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/letsencrypt/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/mysql_tuner/">MySQL Tuner</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>3 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size’ => ‘256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/mysql_tuner/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker + custom even viewer view? + test server? |
||||
EventViewer run: eventvwr |
||||
custom views windows application (non windows standard, puppet, vmware, mssql, …) security, aan en afmelden set-up: updates en installatie verwijderen programma’s system: OS meldingen application and services: diep graven –> Filter Log: |
||||
logged (date range) |
||||
event level |
||||
event source |
||||
event ID: 99,-1024,-4634 |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/windows_troubleshooting/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
|
||||
|
||||
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> |
||||
|
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/luks-encryption/">Luks Encryption</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
By <a class="post-author" >Kristof Vandam</a> |
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Add a new disk (LVM) root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo "- - -" > $i/scan; done root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d "[" -f2|cut -d "]" -f1) root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') root@server:/dev/centos # echo ${NEWDISK} sdd root@server:/dev/centos # echo ${VGROUP} centos root@server:/dev/centos # pvcreate /dev/${NEWDISK} Physical volume "/dev/sdd" successfully created. root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} Volume group "centos" successfully extended Create a logical volume (LVM) root@server:/dev/centos # lvcreate -L 15G -n encrypted centos Logical volume "encrypted" created. |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,483 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
||||
<channel> |
||||
<title>Administrations on Hagfi.sh</title> |
||||
<link>https://hagfi.sh/administration/index.xml</link> |
||||
<description>Recent content in Administrations on Hagfi.sh</description> |
||||
<generator>Hugo -- gohugo.io</generator> |
||||
<language>en-us</language> |
||||
<lastBuildDate>Sat, 25 Aug 2018 22:08:15 +0200</lastBuildDate> |
||||
<atom:link href="https://hagfi.sh/administration/index.xml" rel="self" type="application/rss+xml" /> |
||||
|
||||
<item> |
||||
<title>Let's Encrypt</title> |
||||
<link>https://hagfi.sh/administration/letsencrypt/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/letsencrypt/</guid> |
||||
<description> |
||||
|
||||
<h2 id="let-s-encrypt">Let&rsquo;s Encrypt:</h2> |
||||
|
||||
<ul> |
||||
<li>Aanmaken / vernieuwen certificaat:</li> |
||||
</ul> |
||||
|
||||
<pre><code>/opt/letsencrypt/letsencrypt-auto certonly |
||||
--expand |
||||
---email support@nucleus.be |
||||
--agree-tos |
||||
--webroot |
||||
-w /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<pre><code>/bin/certbot |
||||
--text |
||||
--agree-tos |
||||
--non-interactive |
||||
certonly |
||||
-a webroot |
||||
--webroot-path /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<p><code>--dry-run</code> om het aanmaken te testen.</p> |
||||
|
||||
<h3 id="apache-httpd">Apache / httpd</h3> |
||||
|
||||
<ul> |
||||
<li>(1) Voeg volgende regels toe aan de apache config:</li> |
||||
</ul> |
||||
|
||||
<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known |
||||
&lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; |
||||
order allow,deny |
||||
allow from all |
||||
satisfy any |
||||
&lt;/Directory&gt; |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Of (2) voeg volgende regels toe aan .htaccess:</li> |
||||
</ul> |
||||
|
||||
<pre><code>&lt;IfModule mod_rewrite.c&gt; |
||||
RewriteEngine on |
||||
#Allow Let's Encrypt SSL renewal |
||||
RewriteRule ^.well-known/ - [L,NC] |
||||
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ |
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br /> |
||||
<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li> |
||||
</ul> |
||||
|
||||
<pre><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt; |
||||
AuthType Basic |
||||
AuthName protected |
||||
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd |
||||
require valid-user |
||||
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# |
||||
&lt;/Directory&gt; |
||||
</code></pre> |
||||
|
||||
<h3 id="nginx">Nginx</h3> |
||||
|
||||
<ul> |
||||
<li>Voeg volgende regels toe aan Nginx</li> |
||||
</ul> |
||||
|
||||
<pre><code> location /.well-known { |
||||
root /var/www/vhosts/WEB/ROOT; |
||||
index index.html index.htm index.php; |
||||
} |
||||
</code></pre> |
||||
|
||||
<p>-</p> |
||||
|
||||
<ul> |
||||
<li>Controleer DNS lijst domeinen:</li> |
||||
</ul> |
||||
|
||||
<pre><code>while read LINE; |
||||
do |
||||
echo $LINE &gt;&gt; list_processed.txt &amp;&amp; dig +short @9.9.9.9 $LINE &gt;&gt; list_processed.txt; |
||||
done &lt; list.txt |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>(WIP) |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<pre><code>#!/bin/bash |
||||
|
||||
#IP=&lt;%= @default_ipadress %&gt; |
||||
IP=$(dig +short @9.9.9.9 $(hostname)) |
||||
FILE=$1 |
||||
|
||||
while read LINE |
||||
do |
||||
CHK=$(dig +short @9.9.9.9 $LINE) |
||||
if $IP -eq $CHK |
||||
echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-ok |
||||
elif |
||||
echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-nok |
||||
fi |
||||
done &lt; $FILE |
||||
|
||||
echo &quot;Domains OK:&quot; |
||||
echo /tmp/le-ok | column |
||||
echo &quot;-------------------------------&quot; |
||||
echo &quot;Domains NOT OK:&quot; |
||||
echo /tmp/le-nok | column |
||||
|
||||
rm -rf /tmp/le-ok |
||||
rm -rf /tmp/le-nok |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>MySQL Tuner</title> |
||||
<link>https://hagfi.sh/administration/mysql_tuner/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/mysql_tuner/</guid> |
||||
<description> |
||||
|
||||
<h2 id="mysql-tuner">MySQL Tuner</h2> |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>WAARDE</th> |
||||
<th>ACTIE</th> |
||||
</tr> |
||||
</thead> |
||||
|
||||
<tbody> |
||||
<tr> |
||||
<td><code>query_cache_size</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_cache</code></td> |
||||
<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_open_cache</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>join_buffer_size</code></td> |
||||
<td>Verhogen indien <code>Joins performed without indexes++</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>tmp_table_size</code></td> |
||||
<td>Verhogen = <code>max_heap_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>max_heap_table_size</code></td> |
||||
<td>Verhogen <code>= tmp_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>query_cache_type</code></td> |
||||
<td><code>=1</code> indien <code>=0</code></td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
<blockquote> |
||||
<p>mysql tuning improvements |
||||
<code>table_cache</code> NOOIT hoger dan 64 |
||||
Sudo vim /etc/my.cnf |
||||
query_cache_size&rsquo; =&gt; &lsquo;256M’, |
||||
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. |
||||
&lsquo;open_files_limit&rsquo; =&gt; &lsquo;4096&rsquo;, |
||||
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. |
||||
&lsquo;join_buffer_size&rsquo; =&gt; &lsquo;256K’, |
||||
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. |
||||
Minimumgrootte van buffer voor index en table scans.</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>&lsquo;max_heap_table_size&rsquo; =&gt; &lsquo;32M’, |
||||
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. |
||||
Max grootte van user-created memory tables |
||||
These 2 need to be the same size!!! |
||||
&lsquo;tmp_table_size&rsquo; =&gt; &lsquo;32M’, |
||||
The maximum size of internal in-memory temporary tables. |
||||
Max grootte van interne in-memory tijdelijke tabellen</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>table_cache=64 (maximumwaarde!!) |
||||
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&rsquo;ll keep opening and closing tables. |
||||
Maximumwaarde voor caching van geopende tabellen. |
||||
thread_cache_size=4 |
||||
How many threads the server should cache for reuse. |
||||
Aantal threads dat de server kan cachen voor hergebruik. |
||||
&lsquo;innodb_buffer_pool_size&rsquo; =&gt; &lsquo;1G&rsquo;, |
||||
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p> |
||||
</blockquote> |
||||
|
||||
<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p> |
||||
|
||||
<ul> |
||||
<li><code>query_cache_*</code>:</li> |
||||
</ul> |
||||
|
||||
<blockquote> |
||||
<p><code>query_cache_type</code><br /> |
||||
Needs to be set to 1 to enable caching.<br /> |
||||
<code>query_cache_size</code><br /> |
||||
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br /> |
||||
<code>query_cache_limit</code><br /> |
||||
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br /> |
||||
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br /> |
||||
<code>table_open_cache</code><br /> |
||||
Indicates the maximum number of tables the server keeps open</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<p><code>innodb_buffer_pool_instances=2</code><br /> |
||||
<em>Enables the use of multiple threads for innodb.</em></p> |
||||
|
||||
<p><code>query_cache_type=1</code><br /> |
||||
<em>Enables query caching.</em></p> |
||||
|
||||
<p><code>join_buffer_size=1024K</code><br /> |
||||
<em>Increased the buffer size for non-indexed joins.</em></p> |
||||
|
||||
<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br /> |
||||
<em>Increased the size for temporary tables.</em></p> |
||||
|
||||
<p><code>join_buffer_size</code><br /> |
||||
<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p> |
||||
|
||||
<p><code>max_heap_table_size &amp; tmp_table_size</code><br /> |
||||
<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p> |
||||
|
||||
<p><code>thread_cache_size</code><br /> |
||||
<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Windows troubleshooting</title> |
||||
<link>https://hagfi.sh/administration/windows_troubleshooting/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/windows_troubleshooting/</guid> |
||||
<description> |
||||
|
||||
<h2 id="windows-troubleshooting">Windows troubleshooting</h2> |
||||
|
||||
<p>VRAGEN: |
||||
+ openen vanuit ticketing, wachtwoord en gebruiker |
||||
+ custom even viewer view? |
||||
+ test server?</p> |
||||
|
||||
<h3 id="eventviewer"><em>EventViewer</em></h3> |
||||
|
||||
<p>run: eventvwr</p> |
||||
|
||||
<ul> |
||||
<li>custom views</li> |
||||
<li>windows |
||||
|
||||
<ul> |
||||
<li>application (non windows standard, puppet, vmware, mssql, &hellip;)</li> |
||||
<li>security, aan en afmelden</li> |
||||
<li>set-up: updates en installatie verwijderen programma&rsquo;s</li> |
||||
<li>system: OS meldingen</li> |
||||
</ul></li> |
||||
<li>application and services: diep graven |
||||
<br /> |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<p>&ndash;&gt; Filter Log:</p> |
||||
|
||||
<ul> |
||||
<li>logged (date range)<br /></li> |
||||
<li>event level<br /></li> |
||||
<li>event source<br /></li> |
||||
<li>event ID: 99,-1024,-4634<br /></li> |
||||
</ul> |
||||
|
||||
<p>rechtsonderaan &gt; event copy &gt; copy as text</p> |
||||
|
||||
<h3 id="powershell"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$first = |
||||
$last = |
||||
get-eventlog -Logname system - |
||||
</code></pre> |
||||
|
||||
<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` |
||||
</code></pre> |
||||
|
||||
<h3 id="task-viewer"><em>Task Viewer</em></h3> |
||||
|
||||
<ul> |
||||
<li>tasks</li> |
||||
<li>users</li> |
||||
<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li> |
||||
</ul> |
||||
|
||||
<h3 id="resource-monitor"><em>Resource monitor</em></h3> |
||||
|
||||
<p>(task manager &gt; performance &gt; open resouce monitor)</p> |
||||
|
||||
<p>Overview &gt; CPU (ovenste tab) app aanvinken &ndash;&gt; filtert alles</p> |
||||
|
||||
<h3 id="netstat"><em>Netstat</em></h3> |
||||
|
||||
<p><code>netstat -abo &gt; C:\temp\log.txt</code></p> |
||||
|
||||
<h3 id="chocolate"><em>Chocolate</em></h3> |
||||
|
||||
<p>C:\ProgramData\chocolatey\bin\Procmon.exe |
||||
&ndash;&gt; selecteer lijn+kolom &gt; exclude &lsquo;name&rsquo; (=grep -v) / include &lsquo;name&rsquo; (=grep)</p> |
||||
|
||||
<h3 id="usefull-programs"><em>Usefull programs</em></h3> |
||||
|
||||
<ul> |
||||
<li>TreeView</li> |
||||
<li>VBluescreenviewer</li> |
||||
<li>Sysinternals</li> |
||||
<li>Zabbix</li> |
||||
<li>VMware events</li> |
||||
<li>BareTail</li> |
||||
<li>choco install</li> |
||||
<li>choco list -lo (view choco installed programs)</li> |
||||
<li>telnet 12.34.56.78 900</li> |
||||
<li>powershell: <code>stop service 'name'</code></li> |
||||
</ul> |
||||
|
||||
<h3 id="eventid-s"><em>EventID&rsquo;s</em></h3> |
||||
|
||||
<ul> |
||||
<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li> |
||||
<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li> |
||||
<li>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</li> |
||||
<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li> |
||||
|
||||
<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. |
||||
Add to that a couple more from the Server Fault answers listed in my OP:</p></li> |
||||
|
||||
<li><p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p></li> |
||||
|
||||
<li><p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li> |
||||
</ul> |
||||
|
||||
<h3 id="powershell-1"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$filter = &quot;*abbix*&quot; |
||||
get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Dont Let Your Application Interfere With Letsencrypt</title> |
||||
<link>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:46:41 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</guid> |
||||
<description> |
||||
|
||||
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Luks Encryption</title> |
||||
<link>https://hagfi.sh/administration/luks-encryption/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/luks-encryption/</guid> |
||||
<description> |
||||
|
||||
<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done |
||||
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) |
||||
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') |
||||
root@server:/dev/centos # echo ${NEWDISK} |
||||
sdd |
||||
root@server:/dev/centos # echo ${VGROUP} |
||||
centos |
||||
root@server:/dev/centos # pvcreate /dev/${NEWDISK} |
||||
Physical volume &quot;/dev/sdd&quot; successfully created. |
||||
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} |
||||
Volume group &quot;centos&quot; successfully extended |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos |
||||
Logical volume &quot;encrypted&quot; created. |
||||
</code></pre> |
||||
|
||||
<h2 id="encrypt-the-partition">Encrypt the partition</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted |
||||
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-mountpoint">Create a mountpoint</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # mkdir /encrypted |
||||
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 |
||||
root@server:/dev/mapper # chmod 0400 /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="unmount-and-add-the-key">Unmount and add the key</h2> |
||||
|
||||
<pre><code>root@server:/ # umount /encrypted |
||||
root@server:/ # cryptsetup luksClose luks-encrypted |
||||
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="get-uuid">Get UUID</h2> |
||||
|
||||
<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted |
||||
/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot; |
||||
</code></pre> |
||||
|
||||
<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2> |
||||
|
||||
<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
</channel> |
||||
</rss> |
||||
@ -0,0 +1,304 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Let's Encrypt // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Let's Encrypt" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/letsencrypt/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#let-s-encrypt">Let’s Encrypt:</a> |
||||
<ul> |
||||
<li><a href="#apache-httpd">Apache / httpd</a></li> |
||||
<li><a href="#nginx">Nginx</a></li> |
||||
</ul></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/administration/letsencrypt/">Let's Encrypt</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="let-s-encrypt">Let’s Encrypt:</h2> |
||||
|
||||
<ul> |
||||
<li>Aanmaken / vernieuwen certificaat:</li> |
||||
</ul> |
||||
|
||||
<pre><code>/opt/letsencrypt/letsencrypt-auto certonly |
||||
--expand |
||||
---email support@nucleus.be |
||||
--agree-tos |
||||
--webroot |
||||
-w /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<pre><code>/bin/certbot |
||||
--text |
||||
--agree-tos |
||||
--non-interactive |
||||
certonly |
||||
-a webroot |
||||
--webroot-path /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<p><code>--dry-run</code> om het aanmaken te testen.</p> |
||||
|
||||
<h3 id="apache-httpd">Apache / httpd</h3> |
||||
|
||||
<ul> |
||||
<li>(1) Voeg volgende regels toe aan de apache config:</li> |
||||
</ul> |
||||
|
||||
<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known |
||||
<Directory /var/www/vhosts/letsencrypt/.well-known> |
||||
order allow,deny |
||||
allow from all |
||||
satisfy any |
||||
</Directory> |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Of (2) voeg volgende regels toe aan .htaccess:</li> |
||||
</ul> |
||||
|
||||
<pre><code><IfModule mod_rewrite.c> |
||||
RewriteEngine on |
||||
#Allow Let's Encrypt SSL renewal |
||||
RewriteRule ^.well-known/ - [L,NC] |
||||
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ |
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Combineer Basic Auth met Let’s Encrypt:<br /> |
||||
<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li> |
||||
</ul> |
||||
|
||||
<pre><code> <Directory /var/www/vhosts/WEB/ROOT> |
||||
AuthType Basic |
||||
AuthName protected |
||||
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd |
||||
require valid-user |
||||
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# |
||||
</Directory> |
||||
</code></pre> |
||||
|
||||
<h3 id="nginx">Nginx</h3> |
||||
|
||||
<ul> |
||||
<li>Voeg volgende regels toe aan Nginx</li> |
||||
</ul> |
||||
|
||||
<pre><code> location /.well-known { |
||||
root /var/www/vhosts/WEB/ROOT; |
||||
index index.html index.htm index.php; |
||||
} |
||||
</code></pre> |
||||
|
||||
<p>-</p> |
||||
|
||||
<ul> |
||||
<li>Controleer DNS lijst domeinen:</li> |
||||
</ul> |
||||
|
||||
<pre><code>while read LINE; |
||||
do |
||||
echo $LINE >> list_processed.txt && dig +short @9.9.9.9 $LINE >> list_processed.txt; |
||||
done < list.txt |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>(WIP) |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<pre><code>#!/bin/bash |
||||
|
||||
#IP=<%= @default_ipadress %> |
||||
IP=$(dig +short @9.9.9.9 $(hostname)) |
||||
FILE=$1 |
||||
|
||||
while read LINE |
||||
do |
||||
CHK=$(dig +short @9.9.9.9 $LINE) |
||||
if $IP -eq $CHK |
||||
echo "$LINE|$CHK" >> /tmp/le-ok |
||||
elif |
||||
echo "$LINE|$CHK" >> /tmp/le-nok |
||||
fi |
||||
done < $FILE |
||||
|
||||
echo "Domains OK:" |
||||
echo /tmp/le-ok | column |
||||
echo "-------------------------------" |
||||
echo "Domains NOT OK:" |
||||
echo /tmp/le-nok | column |
||||
|
||||
rm -rf /tmp/le-ok |
||||
rm -rf /tmp/le-nok |
||||
</code></pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,250 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Luks Encryption // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content="Kristof Vandam"> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Luks Encryption" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/luks-encryption/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#add-a-new-disk-lvm">Add a new disk (LVM)</a></li> |
||||
<li><a href="#create-a-logical-volume-lvm">Create a logical volume (LVM)</a></li> |
||||
<li><a href="#encrypt-the-partition">Encrypt the partition</a></li> |
||||
<li><a href="#create-a-mountpoint">Create a mountpoint</a></li> |
||||
<li><a href="#create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</a></li> |
||||
<li><a href="#unmount-and-add-the-key">Unmount and add the key</a></li> |
||||
<li><a href="#get-uuid">Get UUID</a></li> |
||||
<li><a href="#auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</a></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/administration/luks-encryption/">Luks Encryption</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo "- - -" > $i/scan; done |
||||
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d "[" -f2|cut -d "]" -f1) |
||||
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') |
||||
root@server:/dev/centos # echo ${NEWDISK} |
||||
sdd |
||||
root@server:/dev/centos # echo ${VGROUP} |
||||
centos |
||||
root@server:/dev/centos # pvcreate /dev/${NEWDISK} |
||||
Physical volume "/dev/sdd" successfully created. |
||||
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} |
||||
Volume group "centos" successfully extended |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos |
||||
Logical volume "encrypted" created. |
||||
</code></pre> |
||||
|
||||
<h2 id="encrypt-the-partition">Encrypt the partition</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted |
||||
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-mountpoint">Create a mountpoint</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # mkdir /encrypted |
||||
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 |
||||
root@server:/dev/mapper # chmod 0400 /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="unmount-and-add-the-key">Unmount and add the key</h2> |
||||
|
||||
<pre><code>root@server:/ # umount /encrypted |
||||
root@server:/ # cryptsetup luksClose luks-encrypted |
||||
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="get-uuid">Get UUID</h2> |
||||
|
||||
<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted |
||||
/dev/mapper/centos-encrypted: UUID="0dab9a5c-1870-478d-8d74-226eeb512f78" TYPE="crypto_LUKS" |
||||
</code></pre> |
||||
|
||||
<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2> |
||||
|
||||
<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks |
||||
</code></pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/development/vue-js/">Vue Js</a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/">Administrations</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,307 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
MySQL Tuner // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="MySQL Tuner" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/mysql_tuner/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#mysql-tuner">MySQL Tuner</a></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/administration/mysql_tuner/">MySQL Tuner</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="mysql-tuner">MySQL Tuner</h2> |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>WAARDE</th> |
||||
<th>ACTIE</th> |
||||
</tr> |
||||
</thead> |
||||
|
||||
<tbody> |
||||
<tr> |
||||
<td><code>query_cache_size</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_cache</code></td> |
||||
<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_open_cache</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>join_buffer_size</code></td> |
||||
<td>Verhogen indien <code>Joins performed without indexes++</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>tmp_table_size</code></td> |
||||
<td>Verhogen = <code>max_heap_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>max_heap_table_size</code></td> |
||||
<td>Verhogen <code>= tmp_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>query_cache_type</code></td> |
||||
<td><code>=1</code> indien <code>=0</code></td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
<blockquote> |
||||
<p>mysql tuning improvements |
||||
<code>table_cache</code> NOOIT hoger dan 64 |
||||
Sudo vim /etc/my.cnf |
||||
query_cache_size’ => ‘256M’, |
||||
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. |
||||
‘open_files_limit’ => ‘4096’, |
||||
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. |
||||
‘join_buffer_size’ => ‘256K’, |
||||
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. |
||||
Minimumgrootte van buffer voor index en table scans.</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>‘max_heap_table_size’ => ‘32M’, |
||||
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. |
||||
Max grootte van user-created memory tables |
||||
These 2 need to be the same size!!! |
||||
‘tmp_table_size’ => ‘32M’, |
||||
The maximum size of internal in-memory temporary tables. |
||||
Max grootte van interne in-memory tijdelijke tabellen</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>table_cache=64 (maximumwaarde!!) |
||||
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it’ll keep opening and closing tables. |
||||
Maximumwaarde voor caching van geopende tabellen. |
||||
thread_cache_size=4 |
||||
How many threads the server should cache for reuse. |
||||
Aantal threads dat de server kan cachen voor hergebruik. |
||||
‘innodb_buffer_pool_size’ => ‘1G’, |
||||
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p> |
||||
</blockquote> |
||||
|
||||
<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p> |
||||
|
||||
<ul> |
||||
<li><code>query_cache_*</code>:</li> |
||||
</ul> |
||||
|
||||
<blockquote> |
||||
<p><code>query_cache_type</code><br /> |
||||
Needs to be set to 1 to enable caching.<br /> |
||||
<code>query_cache_size</code><br /> |
||||
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br /> |
||||
<code>query_cache_limit</code><br /> |
||||
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br /> |
||||
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br /> |
||||
<code>table_open_cache</code><br /> |
||||
Indicates the maximum number of tables the server keeps open</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<p><code>innodb_buffer_pool_instances=2</code><br /> |
||||
<em>Enables the use of multiple threads for innodb.</em></p> |
||||
|
||||
<p><code>query_cache_type=1</code><br /> |
||||
<em>Enables query caching.</em></p> |
||||
|
||||
<p><code>join_buffer_size=1024K</code><br /> |
||||
<em>Increased the buffer size for non-indexed joins.</em></p> |
||||
|
||||
<p><code>tmp_table_size=64M && max_heap_table_size=64M</code><br /> |
||||
<em>Increased the size for temporary tables.</em></p> |
||||
|
||||
<p><code>join_buffer_size</code><br /> |
||||
<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p> |
||||
|
||||
<p><code>max_heap_table_size & tmp_table_size</code><br /> |
||||
<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p> |
||||
|
||||
<p><code>thread_cache_size</code><br /> |
||||
<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/letsencrypt/">Let's Encrypt</a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/windows_troubleshooting/">Windows troubleshooting</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,297 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Windows troubleshooting // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Windows troubleshooting" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/administration/windows_troubleshooting/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#windows-troubleshooting">Windows troubleshooting</a> |
||||
<ul> |
||||
<li><a href="#eventviewer"><em>EventViewer</em></a></li> |
||||
<li><a href="#powershell"><em>PowerShell</em></a></li> |
||||
<li><a href="#task-viewer"><em>Task Viewer</em></a></li> |
||||
<li><a href="#resource-monitor"><em>Resource monitor</em></a></li> |
||||
<li><a href="#netstat"><em>Netstat</em></a></li> |
||||
<li><a href="#chocolate"><em>Chocolate</em></a></li> |
||||
<li><a href="#usefull-programs"><em>Usefull programs</em></a></li> |
||||
<li><a href="#eventid-s"><em>EventID’s</em></a></li> |
||||
<li><a href="#powershell-1"><em>PowerShell</em></a></li> |
||||
</ul></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="windows-troubleshooting">Windows troubleshooting</h2> |
||||
|
||||
<p>VRAGEN: |
||||
+ openen vanuit ticketing, wachtwoord en gebruiker |
||||
+ custom even viewer view? |
||||
+ test server?</p> |
||||
|
||||
<h3 id="eventviewer"><em>EventViewer</em></h3> |
||||
|
||||
<p>run: eventvwr</p> |
||||
|
||||
<ul> |
||||
<li>custom views</li> |
||||
<li>windows |
||||
|
||||
<ul> |
||||
<li>application (non windows standard, puppet, vmware, mssql, …)</li> |
||||
<li>security, aan en afmelden</li> |
||||
<li>set-up: updates en installatie verwijderen programma’s</li> |
||||
<li>system: OS meldingen</li> |
||||
</ul></li> |
||||
<li>application and services: diep graven |
||||
<br /> |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<p>–> Filter Log:</p> |
||||
|
||||
<ul> |
||||
<li>logged (date range)<br /></li> |
||||
<li>event level<br /></li> |
||||
<li>event source<br /></li> |
||||
<li>event ID: 99,-1024,-4634<br /></li> |
||||
</ul> |
||||
|
||||
<p>rechtsonderaan > event copy > copy as text</p> |
||||
|
||||
<h3 id="powershell"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$first = |
||||
$last = |
||||
get-eventlog -Logname system - |
||||
</code></pre> |
||||
|
||||
<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` |
||||
</code></pre> |
||||
|
||||
<h3 id="task-viewer"><em>Task Viewer</em></h3> |
||||
|
||||
<ul> |
||||
<li>tasks</li> |
||||
<li>users</li> |
||||
<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li> |
||||
</ul> |
||||
|
||||
<h3 id="resource-monitor"><em>Resource monitor</em></h3> |
||||
|
||||
<p>(task manager > performance > open resouce monitor)</p> |
||||
|
||||
<p>Overview > CPU (ovenste tab) app aanvinken –> filtert alles</p> |
||||
|
||||
<h3 id="netstat"><em>Netstat</em></h3> |
||||
|
||||
<p><code>netstat -abo > C:\temp\log.txt</code></p> |
||||
|
||||
<h3 id="chocolate"><em>Chocolate</em></h3> |
||||
|
||||
<p>C:\ProgramData\chocolatey\bin\Procmon.exe |
||||
–> selecteer lijn+kolom > exclude ‘name’ (=grep -v) / include ‘name’ (=grep)</p> |
||||
|
||||
<h3 id="usefull-programs"><em>Usefull programs</em></h3> |
||||
|
||||
<ul> |
||||
<li>TreeView</li> |
||||
<li>VBluescreenviewer</li> |
||||
<li>Sysinternals</li> |
||||
<li>Zabbix</li> |
||||
<li>VMware events</li> |
||||
<li>BareTail</li> |
||||
<li>choco install</li> |
||||
<li>choco list -lo (view choco installed programs)</li> |
||||
<li>telnet 12.34.56.78 900</li> |
||||
<li>powershell: <code>stop service 'name'</code></li> |
||||
</ul> |
||||
|
||||
<h3 id="eventid-s"><em>EventID’s</em></h3> |
||||
|
||||
<ul> |
||||
<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li> |
||||
<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li> |
||||
<li>Event ID 6008: “The previous system shutdown was unexpected.” Records that the system started after it was not shut down properly.</li> |
||||
<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li> |
||||
|
||||
<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. |
||||
Add to that a couple more from the Server Fault answers listed in my OP:</p></li> |
||||
|
||||
<li><p>Event ID 1074: “The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.” Indicates that an application or a user initiated a restart or shutdown.</p></li> |
||||
|
||||
<li><p>Event ID 1076: “The reason supplied by user X for the last unexpected shutdown of this computer is: Y.” Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li> |
||||
</ul> |
||||
|
||||
<h3 id="powershell-1"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$filter = "*abbix*" |
||||
get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } |
||||
</code></pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,210 @@
|
||||
/* Preload images */ |
||||
body:after { |
||||
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png); |
||||
display: none; |
||||
} |
||||
|
||||
.lightboxOverlay { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
z-index: 9999; |
||||
background-color: black; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); |
||||
opacity: 0.8; |
||||
display: none; |
||||
} |
||||
|
||||
.lightbox { |
||||
position: absolute; |
||||
left: 0; |
||||
width: 100%; |
||||
z-index: 10000; |
||||
text-align: center; |
||||
line-height: 0; |
||||
font-weight: normal; |
||||
} |
||||
|
||||
.lightbox .lb-image { |
||||
display: block; |
||||
height: auto; |
||||
max-width: inherit; |
||||
-webkit-border-radius: 3px; |
||||
-moz-border-radius: 3px; |
||||
-ms-border-radius: 3px; |
||||
-o-border-radius: 3px; |
||||
border-radius: 3px; |
||||
} |
||||
|
||||
.lightbox a img { |
||||
border: none; |
||||
} |
||||
|
||||
.lb-outerContainer { |
||||
position: relative; |
||||
background-color: white; |
||||
*zoom: 1; |
||||
width: 250px; |
||||
height: 250px; |
||||
margin: 0 auto; |
||||
-webkit-border-radius: 4px; |
||||
-moz-border-radius: 4px; |
||||
-ms-border-radius: 4px; |
||||
-o-border-radius: 4px; |
||||
border-radius: 4px; |
||||
} |
||||
|
||||
.lb-outerContainer:after { |
||||
content: ""; |
||||
display: table; |
||||
clear: both; |
||||
} |
||||
|
||||
.lb-container { |
||||
padding: 4px; |
||||
} |
||||
|
||||
.lb-loader { |
||||
position: absolute; |
||||
top: 43%; |
||||
left: 0; |
||||
height: 25%; |
||||
width: 100%; |
||||
text-align: center; |
||||
line-height: 0; |
||||
} |
||||
|
||||
.lb-cancel { |
||||
display: block; |
||||
width: 32px; |
||||
height: 32px; |
||||
margin: 0 auto; |
||||
background: url(../img/loading.gif) no-repeat; |
||||
} |
||||
|
||||
.lb-nav { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
height: 100%; |
||||
width: 100%; |
||||
z-index: 10; |
||||
} |
||||
|
||||
.lb-container > .nav { |
||||
left: 0; |
||||
} |
||||
|
||||
.lb-nav a { |
||||
outline: none; |
||||
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); |
||||
} |
||||
|
||||
.lb-prev, .lb-next { |
||||
height: 100%; |
||||
cursor: pointer; |
||||
display: block; |
||||
} |
||||
|
||||
.lb-nav a.lb-prev { |
||||
width: 34%; |
||||
left: 0; |
||||
float: left; |
||||
background: url(../img/prev.png) left 48% no-repeat; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |
||||
opacity: 0; |
||||
-webkit-transition: opacity 0.6s; |
||||
-moz-transition: opacity 0.6s; |
||||
-o-transition: opacity 0.6s; |
||||
transition: opacity 0.6s; |
||||
} |
||||
|
||||
.lb-nav a.lb-prev:hover { |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
|
||||
.lb-nav a.lb-next { |
||||
width: 64%; |
||||
right: 0; |
||||
float: right; |
||||
background: url(../img/next.png) right 48% no-repeat; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |
||||
opacity: 0; |
||||
-webkit-transition: opacity 0.6s; |
||||
-moz-transition: opacity 0.6s; |
||||
-o-transition: opacity 0.6s; |
||||
transition: opacity 0.6s; |
||||
} |
||||
|
||||
.lb-nav a.lb-next:hover { |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
|
||||
.lb-dataContainer { |
||||
margin: 0 auto; |
||||
padding-top: 5px; |
||||
*zoom: 1; |
||||
width: 100%; |
||||
-moz-border-radius-bottomleft: 4px; |
||||
-webkit-border-bottom-left-radius: 4px; |
||||
border-bottom-left-radius: 4px; |
||||
-moz-border-radius-bottomright: 4px; |
||||
-webkit-border-bottom-right-radius: 4px; |
||||
border-bottom-right-radius: 4px; |
||||
} |
||||
|
||||
.lb-dataContainer:after { |
||||
content: ""; |
||||
display: table; |
||||
clear: both; |
||||
} |
||||
|
||||
.lb-data { |
||||
padding: 0 4px; |
||||
color: #ccc; |
||||
} |
||||
|
||||
.lb-data .lb-details { |
||||
width: 85%; |
||||
float: left; |
||||
text-align: left; |
||||
line-height: 1.1em; |
||||
} |
||||
|
||||
.lb-data .lb-caption { |
||||
font-size: 13px; |
||||
font-weight: bold; |
||||
line-height: 1em; |
||||
} |
||||
|
||||
.lb-data .lb-number { |
||||
display: block; |
||||
clear: left; |
||||
padding-bottom: 1em; |
||||
font-size: 12px; |
||||
color: #999999; |
||||
} |
||||
|
||||
.lb-data .lb-close { |
||||
display: block; |
||||
float: right; |
||||
width: 30px; |
||||
height: 30px; |
||||
background: url(../img/close.png) top right no-repeat; |
||||
text-align: right; |
||||
outline: none; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); |
||||
opacity: 0.7; |
||||
-webkit-transition: opacity 0.2s; |
||||
-moz-transition: opacity 0.2s; |
||||
-o-transition: opacity 0.2s; |
||||
transition: opacity 0.2s; |
||||
} |
||||
|
||||
.lb-data .lb-close:hover { |
||||
cursor: pointer; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
@ -0,0 +1,499 @@
|
||||
* { |
||||
-webkit-box-sizing: border-box; |
||||
-moz-box-sizing: border-box; |
||||
box-sizing: border-box; |
||||
} |
||||
html { |
||||
color: #2d303b; |
||||
} |
||||
html, p, nav, section, article { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
} |
||||
pre { |
||||
padding: 0; |
||||
} |
||||
p { |
||||
color: #2d303b; |
||||
} |
||||
a { |
||||
-o-transition:.5s; |
||||
-ms-transition:.5s; |
||||
-moz-transition:.5s; |
||||
-webkit-transition:.5s; |
||||
transition:.5s; |
||||
color: #616161; |
||||
} |
||||
a:hover { |
||||
color:#E54028; |
||||
} |
||||
a:hover, |
||||
a:focus { |
||||
text-decoration: underline; |
||||
} |
||||
a.pure-button:hover, a.pure-button:focus { |
||||
color: inherit; |
||||
text-decoration: none; |
||||
} |
||||
a.pure-button-primary:hover, a.pure-button-primary:focus { |
||||
color: #fff; |
||||
} |
||||
p a { |
||||
color:#7F1000; |
||||
} |
||||
h1 { |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 700; |
||||
} |
||||
.center { |
||||
text-align: center; |
||||
} |
||||
.red { |
||||
color: #E54028; |
||||
} |
||||
.dark-red { |
||||
color: #7F1000; |
||||
} |
||||
.thin-line { |
||||
height: 1px; |
||||
border: 0px; |
||||
background: #eee; |
||||
} |
||||
|
||||
/* Layout */ |
||||
.pure-img-responsive { |
||||
max-width: 100%; |
||||
height: auto; |
||||
} |
||||
#layout { |
||||
padding: 0; |
||||
} |
||||
.header { |
||||
text-align: center; |
||||
top: auto; |
||||
margin: 3em auto; |
||||
} |
||||
.content { |
||||
padding: 2em 1em 0; |
||||
} |
||||
|
||||
/* Sidebar */ |
||||
h1.brand-title { |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 400; |
||||
padding-top: 1rem; |
||||
font-size: 3rem; |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
h2.brand-tagline { |
||||
font-size: 1.4rem; |
||||
margin-top: 0.25rem; |
||||
} |
||||
.sidebar h1.brand-title { |
||||
color: #fff; |
||||
} |
||||
.brand-tagline { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
font-weight: 200; |
||||
} |
||||
.sidebar { |
||||
background: #2d303b; |
||||
} |
||||
.sidebar, .sidebar p { |
||||
color: #8b8b8b; |
||||
} |
||||
.sidebar a { |
||||
color: #fff; |
||||
} |
||||
.sidebar a:hover { |
||||
color:#E54028; |
||||
} |
||||
|
||||
/* Nav */ |
||||
.nav-list { |
||||
margin: 0; |
||||
padding: 0; |
||||
list-style: none; |
||||
padding-bottom: 1rem; |
||||
} |
||||
.nav-item { |
||||
display: inline-block; |
||||
*display: inline; |
||||
zoom: 1; |
||||
} |
||||
.nav-item a { |
||||
background: transparent; |
||||
color: #fff; |
||||
margin-top: 1rem; |
||||
letter-spacing: 0.05rem; |
||||
text-transform: uppercase; |
||||
font-size: 0.85rem; |
||||
text-decoration: none; |
||||
margin-right: 0.1rem; |
||||
line-height: 1.5rem; |
||||
} |
||||
.nav-item a:hover, |
||||
.nav-item a:focus { |
||||
text-decoration: none; |
||||
} |
||||
.nav-item-separator { |
||||
font-weight: 100; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #E54028; |
||||
letter-spacing: -0.35rem; |
||||
margin-right: 0.4rem; |
||||
} |
||||
|
||||
/* Nav To Top */ |
||||
#nav-to-top { |
||||
display: none; |
||||
position: fixed; |
||||
right: 0; |
||||
top: 10px; |
||||
padding: 0.5rem 1.5rem 0.5rem 0.5rem; |
||||
font-size: 0.85rem; |
||||
background: #fff; |
||||
} |
||||
|
||||
/* Posts */ |
||||
h1.post-title a { |
||||
text-decoration: none; |
||||
color: #111111; |
||||
} |
||||
.post-date { |
||||
color: #E54028; |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 400; |
||||
font-size: 1.0rem; |
||||
} |
||||
.post-date-day { |
||||
font-size: 1.5rem; |
||||
margin-right: -0.2rem; |
||||
} |
||||
.post-date-separator { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
font-weight: 100; |
||||
letter-spacing: -0.35rem; |
||||
font-size: 1.9rem; |
||||
color: #7F1000; |
||||
} |
||||
.post-date-month { |
||||
font-size: 0.8rem; |
||||
color: #7F1000; |
||||
} |
||||
.post-date-year { |
||||
font-size: 0.8rem; |
||||
color: #7F1000; |
||||
} |
||||
a.post-author { |
||||
font-size: 0.9rem; |
||||
text-decoration: underline; |
||||
} |
||||
.post-author-single { |
||||
font-size: 0.9rem; |
||||
} |
||||
.post-author-social a { |
||||
color: #bbb; |
||||
} |
||||
.post-author-social a:hover, .post-author-social a:focus { |
||||
color: #E54028; |
||||
} |
||||
.post-author-social i { |
||||
font-size: 0.9rem; |
||||
} |
||||
.post { |
||||
padding-bottom: 1.8rem; |
||||
line-height: 1.75rem; |
||||
} |
||||
.post p { |
||||
margin-bottom: 1.75rem; |
||||
margin-top: 0; |
||||
} |
||||
.post h3 { |
||||
margin-bottom: .25rem; |
||||
font-size: 1.4rem; |
||||
color: #7F1000; |
||||
font-weight: 500; |
||||
} |
||||
.post h3.post-subtitle { |
||||
font-weight: 200; |
||||
color: #999; |
||||
} |
||||
.post table { |
||||
margin-bottom: 1.75rem; |
||||
margin-top: 0; |
||||
} |
||||
.post-title { |
||||
font-size: 2rem; |
||||
color: #222; |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
.post-subtitle { |
||||
font-size: 1.5rem; |
||||
margin: 0; |
||||
font-weight: 200; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #999; |
||||
} |
||||
.post-reading-time { |
||||
display: inline; |
||||
font-size: 0.65rem; |
||||
color: #aeaeae; |
||||
} |
||||
.post-avatar-wrapper { |
||||
width: 50px; |
||||
height: 50px; |
||||
border-radius: 50px; |
||||
overflow: hidden; |
||||
margin-left: 1rem; |
||||
float: right; |
||||
} |
||||
.post-avatar { |
||||
height: 50px; |
||||
} |
||||
.post-summary { |
||||
margin-top: 0.5rem; |
||||
} |
||||
.read-more-link { |
||||
float: right; |
||||
clear: left; |
||||
margin-top: 0.25rem; |
||||
} |
||||
.read-more-link a { |
||||
text-decoration: none; |
||||
/*text-transform: uppercase;*/ |
||||
font-weight: 400; |
||||
font-size: 0.9rem; |
||||
color: #7F1000; |
||||
} |
||||
.read-more-link a:hover, .read-more-link a:focus { |
||||
color: #E54028; |
||||
} |
||||
.read-more-slashes { |
||||
font-weight: 100; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #E54028; |
||||
letter-spacing: -0.26rem; |
||||
margin-right: 0.3rem; |
||||
} |
||||
|
||||
.post-description { |
||||
color: #444; |
||||
line-height: 1.8rem; |
||||
} |
||||
.post-meta { |
||||
color: #2d303b; |
||||
font-size: 90%; |
||||
margin: 0; |
||||
} |
||||
p.post-meta { |
||||
margin-bottom: 0; |
||||
} |
||||
.post-meta a { |
||||
color: #616161; |
||||
} |
||||
.post-meta a:hover { |
||||
color: #E54028; |
||||
} |
||||
.post-categories { |
||||
clear: left; |
||||
} |
||||
.post-category { |
||||
margin: 0 0.1rem; |
||||
padding: 0.2rem 0.5rem; |
||||
color: #fff; |
||||
background: #999; |
||||
font-size: 0.75rem; |
||||
} |
||||
a.post-category { |
||||
text-decoration: none; |
||||
} |
||||
a.post-category:hover { |
||||
color: #fff; |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
/* Banner Image */ |
||||
.content-banner-image { |
||||
overflow: hidden; |
||||
} |
||||
.content-banner-image-inline { |
||||
float: right; |
||||
margin: 0.5rem 0 1.5rem 2rem; |
||||
} |
||||
|
||||
/* Social Sharing */ |
||||
.social-sharing { |
||||
clear: left; |
||||
padding-left: 2px; |
||||
margin-top: 0.75rem; |
||||
margin-bottom: 0.75rem; |
||||
} |
||||
.social-sharing a { |
||||
padding: 0.4rem; |
||||
background: #ccc; |
||||
color: #fff; |
||||
text-align: center; |
||||
} |
||||
.social-sharing a i { |
||||
width: 16px; |
||||
} |
||||
.social-sharing a i span { |
||||
display: none; |
||||
} |
||||
.social-sharing a.share-button-twitter:hover { |
||||
background: #00aced; |
||||
} |
||||
.social-sharing a.share-button-facebook:hover { |
||||
background: #3b5998; |
||||
} |
||||
.social-sharing a.share-button-linkedin:hover { |
||||
background: #007bb6; |
||||
} |
||||
.social-sharing a.share-button-google-plus:hover { |
||||
background: #dd4b39; |
||||
} |
||||
.social-sharing a.share-button-pinterest:hover { |
||||
background: #cb2027; |
||||
} |
||||
.social-sharing a.share-button-vk:hover { |
||||
background: #45668e; |
||||
} |
||||
|
||||
/* Tags */ |
||||
.tags-list { |
||||
clear: left; |
||||
margin-bottom: 0.75rem; |
||||
font-size: 0.85rem; |
||||
color: #999; |
||||
} |
||||
|
||||
/* Decorative Marker */ |
||||
.decorative-marker { |
||||
color: #E54028; |
||||
letter-spacing: -0.25rem; |
||||
margin-right: 0.4rem; |
||||
margin-lefT: 0.1rem; |
||||
} |
||||
|
||||
/* Paging */ |
||||
.paging { |
||||
margin-bottom: 0.75rem; |
||||
} |
||||
.paging, .paging-older, .paging-newer { |
||||
clear: left; |
||||
font-size: 0.85rem; |
||||
} |
||||
.paging-older, .paging-newer { |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
.paging-label { |
||||
color: #999; |
||||
font-style: italic; |
||||
} |
||||
|
||||
/* ToC */ |
||||
#toc { |
||||
float: right; |
||||
padding: 0 1rem 1rem 1rem; |
||||
border-left: 1px solid #eee; |
||||
font-size: 0.9rem; |
||||
} |
||||
nav#TableOfContents li { |
||||
padding-bottom: 0.25rem; |
||||
} |
||||
nav#TableOfContents ul:first-child { |
||||
padding-left: 0px; |
||||
} |
||||
.toc-label { |
||||
font-size: 0.8rem; |
||||
color: #aeaeae; |
||||
} |
||||
|
||||
/* Footer */ |
||||
.footer { |
||||
text-align: center; |
||||
padding: 1rem 0; |
||||
font-weight: 100; |
||||
color: #aeaeae; |
||||
font-size: 0.7rem; |
||||
} |
||||
.footer a, .footer p { |
||||
color: #aeaeae; |
||||
} |
||||
.footer a { |
||||
text-decoration: none; |
||||
} |
||||
.footer a:hover { |
||||
color:#E54028; |
||||
text-decoration: underline; |
||||
} |
||||
.footer .pure-menu a:hover, |
||||
.footer .pure-menu a:focus { |
||||
background: none; |
||||
} |
||||
ul.footer-menu { |
||||
list-style: none; |
||||
display: block; |
||||
text-align:center; |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
.footer-menu li { |
||||
display: inline-block; |
||||
margin-right: 0.5rem; |
||||
font-size: 0.8rem; |
||||
} |
||||
hr.thin { |
||||
height: 1px; |
||||
border: 0; |
||||
color: #eee; |
||||
background-color: #eee; |
||||
width: 90%; |
||||
} |
||||
|
||||
@media (max-width: 1024px) { |
||||
h1.brand-title { |
||||
font-size: 2.5rem; |
||||
} |
||||
h2.brand-tagline { |
||||
font-size: 1.2rem; |
||||
} |
||||
|
||||
.header>.sidebarphoto{ |
||||
width:160px; |
||||
height:160px; |
||||
border-radius: 50%; |
||||
-moz-border-radius: 50%; |
||||
-webkit-border-radius: 50%; |
||||
} |
||||
} |
||||
|
||||
@media (min-width: 48rem) { |
||||
.content { |
||||
padding: 2rem 3rem 0; |
||||
margin-left: 25%; |
||||
} |
||||
|
||||
.content-banner-image { |
||||
margin-left: 25%; |
||||
} |
||||
|
||||
.header { |
||||
margin: 30% 2rem 0; |
||||
text-align: right; |
||||
} |
||||
|
||||
.header>.sidebarphoto{ |
||||
width:160px; |
||||
height:160px; |
||||
border-radius: 50%; |
||||
-moz-border-radius: 50%; |
||||
-webkit-border-radius: 50%; |
||||
} |
||||
|
||||
.sidebar { |
||||
position: fixed; |
||||
top: 0; |
||||
bottom: 0; |
||||
} |
||||
} |
||||
@ -0,0 +1,136 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Developments // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Developments" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/development/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="https://hagfi.sh/development/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
<div class="posts"> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/development/vue-js/">Vue Js</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
|
||||
|
||||
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> |
||||
|
||||
|
||||
</section> |
||||
|
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
||||
<channel> |
||||
<title>Developments on Hagfi.sh</title> |
||||
<link>https://hagfi.sh/development/index.xml</link> |
||||
<description>Recent content in Developments on Hagfi.sh</description> |
||||
<generator>Hugo -- gohugo.io</generator> |
||||
<language>en-us</language> |
||||
<lastBuildDate>Thu, 23 Aug 2018 22:44:46 +0200</lastBuildDate> |
||||
<atom:link href="https://hagfi.sh/development/index.xml" rel="self" type="application/rss+xml" /> |
||||
|
||||
<item> |
||||
<title>Vue Js</title> |
||||
<link>https://hagfi.sh/development/vue-js/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:44:46 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/development/vue-js/</guid> |
||||
<description> |
||||
|
||||
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> |
||||
</description> |
||||
</item> |
||||
|
||||
</channel> |
||||
</rss> |
||||
@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Vue Js // Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Vue Js" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/development/vue-js/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
|
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
<nav id="TableOfContents"> |
||||
<ul> |
||||
<li> |
||||
<ul> |
||||
<li><a href="#awesomeness-about-vuejs">Awesomeness about VueJS</a></li> |
||||
</ul></li> |
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
|
||||
|
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="/development/vue-js/">Vue Js</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
|
||||
</h3> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
|
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="/administration/luks-encryption/">Luks Encryption</a> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
||||
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,297 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
<head> |
||||
<title> |
||||
Hagfi.sh |
||||
</title> |
||||
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content=""> |
||||
<meta name="keywords" content=""> |
||||
<meta name="author" content=""> |
||||
<meta name="generator" content="Hugo 0.18.1" /> |
||||
|
||||
<meta property="og:title" content="Hagfi.sh" /> |
||||
<meta property="og:description" content="" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="https://hagfi.sh/" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
|
||||
<link href="https://hagfi.sh/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
<div class="sidebar pure-u-1 pure-u-md-1-4"> |
||||
<div class="header"> |
||||
|
||||
|
||||
|
||||
|
||||
<h1 class="brand-title">Hagfi.sh</h1> |
||||
<h2 class="brand-tagline">Documentation</h2> |
||||
|
||||
<nav class="nav"> |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li> |
||||
|
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li> |
||||
|
||||
</ul> |
||||
</nav> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
|
||||
|
||||
<div class="posts"> |
||||
|
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/letsencrypt/">Let's Encrypt</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Let’s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@nucleus.be --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen. |
||||
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known <Directory /var/www/vhosts/letsencrypt/.well-known> order allow,deny allow from all satisfy any </Directory> Of (2) voeg volgende regels toe aan . |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/letsencrypt/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/mysql_tuner/">MySQL Tuner</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>3 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size’ => ‘256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/mysql_tuner/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker + custom even viewer view? + test server? |
||||
EventViewer run: eventvwr |
||||
custom views windows application (non windows standard, puppet, vmware, mssql, …) security, aan en afmelden set-up: updates en installatie verwijderen programma’s system: OS meldingen application and services: diep graven –> Filter Log: |
||||
logged (date range) |
||||
event level |
||||
event source |
||||
event ID: 99,-1024,-4634 |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/windows_troubleshooting/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
|
||||
|
||||
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> |
||||
|
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/development/vue-js/">Vue Js</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
|
||||
|
||||
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> |
||||
|
||||
|
||||
</section> |
||||
|
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
|
||||
<h1 class="post-title"> |
||||
<a href="/administration/luks-encryption/">Luks Encryption</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
|
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span> |
||||
</span> |
||||
|
||||
|
||||
By <a class="post-author" >Kristof Vandam</a> |
||||
|
||||
|
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span> |
||||
|
||||
|
||||
</p> |
||||
|
||||
<article class="post-summary"> |
||||
Add a new disk (LVM) root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo "- - -" > $i/scan; done root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d "[" -f2|cut -d "]" -f1) root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') root@server:/dev/centos # echo ${NEWDISK} sdd root@server:/dev/centos # echo ${VGROUP} centos root@server:/dev/centos # pvcreate /dev/${NEWDISK} Physical volume "/dev/sdd" successfully created. root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} Volume group "centos" successfully extended Create a logical volume (LVM) root@server:/dev/centos # lvcreate -L 15G -n encrypted centos Logical volume "encrypted" created. |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
|
||||
</section> |
||||
|
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,495 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
||||
<channel> |
||||
<title>Hagfi.sh</title> |
||||
<link>https://hagfi.sh/index.xml</link> |
||||
<description>Recent content on Hagfi.sh</description> |
||||
<generator>Hugo -- gohugo.io</generator> |
||||
<language>en-us</language> |
||||
<lastBuildDate>Sat, 25 Aug 2018 22:08:15 +0200</lastBuildDate> |
||||
<atom:link href="https://hagfi.sh/index.xml" rel="self" type="application/rss+xml" /> |
||||
|
||||
<item> |
||||
<title>Let's Encrypt</title> |
||||
<link>https://hagfi.sh/administration/letsencrypt/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/letsencrypt/</guid> |
||||
<description> |
||||
|
||||
<h2 id="let-s-encrypt">Let&rsquo;s Encrypt:</h2> |
||||
|
||||
<ul> |
||||
<li>Aanmaken / vernieuwen certificaat:</li> |
||||
</ul> |
||||
|
||||
<pre><code>/opt/letsencrypt/letsencrypt-auto certonly |
||||
--expand |
||||
---email support@nucleus.be |
||||
--agree-tos |
||||
--webroot |
||||
-w /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<pre><code>/bin/certbot |
||||
--text |
||||
--agree-tos |
||||
--non-interactive |
||||
certonly |
||||
-a webroot |
||||
--webroot-path /var/www/vhosts/WEB/ROOT |
||||
-d domain.tld |
||||
-d domainalias.tld |
||||
--dry-run |
||||
</code></pre> |
||||
|
||||
<p><code>--dry-run</code> om het aanmaken te testen.</p> |
||||
|
||||
<h3 id="apache-httpd">Apache / httpd</h3> |
||||
|
||||
<ul> |
||||
<li>(1) Voeg volgende regels toe aan de apache config:</li> |
||||
</ul> |
||||
|
||||
<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known |
||||
&lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; |
||||
order allow,deny |
||||
allow from all |
||||
satisfy any |
||||
&lt;/Directory&gt; |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Of (2) voeg volgende regels toe aan .htaccess:</li> |
||||
</ul> |
||||
|
||||
<pre><code>&lt;IfModule mod_rewrite.c&gt; |
||||
RewriteEngine on |
||||
#Allow Let's Encrypt SSL renewal |
||||
RewriteRule ^.well-known/ - [L,NC] |
||||
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ |
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br /> |
||||
<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li> |
||||
</ul> |
||||
|
||||
<pre><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt; |
||||
AuthType Basic |
||||
AuthName protected |
||||
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd |
||||
require valid-user |
||||
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# |
||||
&lt;/Directory&gt; |
||||
</code></pre> |
||||
|
||||
<h3 id="nginx">Nginx</h3> |
||||
|
||||
<ul> |
||||
<li>Voeg volgende regels toe aan Nginx</li> |
||||
</ul> |
||||
|
||||
<pre><code> location /.well-known { |
||||
root /var/www/vhosts/WEB/ROOT; |
||||
index index.html index.htm index.php; |
||||
} |
||||
</code></pre> |
||||
|
||||
<p>-</p> |
||||
|
||||
<ul> |
||||
<li>Controleer DNS lijst domeinen:</li> |
||||
</ul> |
||||
|
||||
<pre><code>while read LINE; |
||||
do |
||||
echo $LINE &gt;&gt; list_processed.txt &amp;&amp; dig +short @9.9.9.9 $LINE &gt;&gt; list_processed.txt; |
||||
done &lt; list.txt |
||||
</code></pre> |
||||
|
||||
<ul> |
||||
<li>(WIP) |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<pre><code>#!/bin/bash |
||||
|
||||
#IP=&lt;%= @default_ipadress %&gt; |
||||
IP=$(dig +short @9.9.9.9 $(hostname)) |
||||
FILE=$1 |
||||
|
||||
while read LINE |
||||
do |
||||
CHK=$(dig +short @9.9.9.9 $LINE) |
||||
if $IP -eq $CHK |
||||
echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-ok |
||||
elif |
||||
echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-nok |
||||
fi |
||||
done &lt; $FILE |
||||
|
||||
echo &quot;Domains OK:&quot; |
||||
echo /tmp/le-ok | column |
||||
echo &quot;-------------------------------&quot; |
||||
echo &quot;Domains NOT OK:&quot; |
||||
echo /tmp/le-nok | column |
||||
|
||||
rm -rf /tmp/le-ok |
||||
rm -rf /tmp/le-nok |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>MySQL Tuner</title> |
||||
<link>https://hagfi.sh/administration/mysql_tuner/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/mysql_tuner/</guid> |
||||
<description> |
||||
|
||||
<h2 id="mysql-tuner">MySQL Tuner</h2> |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>WAARDE</th> |
||||
<th>ACTIE</th> |
||||
</tr> |
||||
</thead> |
||||
|
||||
<tbody> |
||||
<tr> |
||||
<td><code>query_cache_size</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_cache</code></td> |
||||
<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>table_open_cache</code></td> |
||||
<td>AFBLIJVEN</td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>join_buffer_size</code></td> |
||||
<td>Verhogen indien <code>Joins performed without indexes++</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>tmp_table_size</code></td> |
||||
<td>Verhogen = <code>max_heap_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>max_heap_table_size</code></td> |
||||
<td>Verhogen <code>= tmp_table_size</code></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><code>query_cache_type</code></td> |
||||
<td><code>=1</code> indien <code>=0</code></td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
<blockquote> |
||||
<p>mysql tuning improvements |
||||
<code>table_cache</code> NOOIT hoger dan 64 |
||||
Sudo vim /etc/my.cnf |
||||
query_cache_size&rsquo; =&gt; &lsquo;256M’, |
||||
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. |
||||
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. |
||||
&lsquo;open_files_limit&rsquo; =&gt; &lsquo;4096&rsquo;, |
||||
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. |
||||
&lsquo;join_buffer_size&rsquo; =&gt; &lsquo;256K’, |
||||
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. |
||||
Minimumgrootte van buffer voor index en table scans.</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>&lsquo;max_heap_table_size&rsquo; =&gt; &lsquo;32M’, |
||||
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. |
||||
Max grootte van user-created memory tables |
||||
These 2 need to be the same size!!! |
||||
&lsquo;tmp_table_size&rsquo; =&gt; &lsquo;32M’, |
||||
The maximum size of internal in-memory temporary tables. |
||||
Max grootte van interne in-memory tijdelijke tabellen</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<blockquote> |
||||
<p>table_cache=64 (maximumwaarde!!) |
||||
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&rsquo;ll keep opening and closing tables. |
||||
Maximumwaarde voor caching van geopende tabellen. |
||||
thread_cache_size=4 |
||||
How many threads the server should cache for reuse. |
||||
Aantal threads dat de server kan cachen voor hergebruik. |
||||
&lsquo;innodb_buffer_pool_size&rsquo; =&gt; &lsquo;1G&rsquo;, |
||||
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p> |
||||
</blockquote> |
||||
|
||||
<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p> |
||||
|
||||
<ul> |
||||
<li><code>query_cache_*</code>:</li> |
||||
</ul> |
||||
|
||||
<blockquote> |
||||
<p><code>query_cache_type</code><br /> |
||||
Needs to be set to 1 to enable caching.<br /> |
||||
<code>query_cache_size</code><br /> |
||||
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br /> |
||||
<code>query_cache_limit</code><br /> |
||||
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br /> |
||||
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br /> |
||||
<code>table_open_cache</code><br /> |
||||
Indicates the maximum number of tables the server keeps open</p> |
||||
</blockquote> |
||||
|
||||
<hr /> |
||||
|
||||
<p><code>innodb_buffer_pool_instances=2</code><br /> |
||||
<em>Enables the use of multiple threads for innodb.</em></p> |
||||
|
||||
<p><code>query_cache_type=1</code><br /> |
||||
<em>Enables query caching.</em></p> |
||||
|
||||
<p><code>join_buffer_size=1024K</code><br /> |
||||
<em>Increased the buffer size for non-indexed joins.</em></p> |
||||
|
||||
<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br /> |
||||
<em>Increased the size for temporary tables.</em></p> |
||||
|
||||
<p><code>join_buffer_size</code><br /> |
||||
<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p> |
||||
|
||||
<p><code>max_heap_table_size &amp; tmp_table_size</code><br /> |
||||
<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p> |
||||
|
||||
<p><code>thread_cache_size</code><br /> |
||||
<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Windows troubleshooting</title> |
||||
<link>https://hagfi.sh/administration/windows_troubleshooting/</link> |
||||
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/windows_troubleshooting/</guid> |
||||
<description> |
||||
|
||||
<h2 id="windows-troubleshooting">Windows troubleshooting</h2> |
||||
|
||||
<p>VRAGEN: |
||||
+ openen vanuit ticketing, wachtwoord en gebruiker |
||||
+ custom even viewer view? |
||||
+ test server?</p> |
||||
|
||||
<h3 id="eventviewer"><em>EventViewer</em></h3> |
||||
|
||||
<p>run: eventvwr</p> |
||||
|
||||
<ul> |
||||
<li>custom views</li> |
||||
<li>windows |
||||
|
||||
<ul> |
||||
<li>application (non windows standard, puppet, vmware, mssql, &hellip;)</li> |
||||
<li>security, aan en afmelden</li> |
||||
<li>set-up: updates en installatie verwijderen programma&rsquo;s</li> |
||||
<li>system: OS meldingen</li> |
||||
</ul></li> |
||||
<li>application and services: diep graven |
||||
<br /> |
||||
<br /></li> |
||||
</ul> |
||||
|
||||
<p>&ndash;&gt; Filter Log:</p> |
||||
|
||||
<ul> |
||||
<li>logged (date range)<br /></li> |
||||
<li>event level<br /></li> |
||||
<li>event source<br /></li> |
||||
<li>event ID: 99,-1024,-4634<br /></li> |
||||
</ul> |
||||
|
||||
<p>rechtsonderaan &gt; event copy &gt; copy as text</p> |
||||
|
||||
<h3 id="powershell"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$first = |
||||
$last = |
||||
get-eventlog -Logname system - |
||||
</code></pre> |
||||
|
||||
<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` |
||||
</code></pre> |
||||
|
||||
<h3 id="task-viewer"><em>Task Viewer</em></h3> |
||||
|
||||
<ul> |
||||
<li>tasks</li> |
||||
<li>users</li> |
||||
<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li> |
||||
</ul> |
||||
|
||||
<h3 id="resource-monitor"><em>Resource monitor</em></h3> |
||||
|
||||
<p>(task manager &gt; performance &gt; open resouce monitor)</p> |
||||
|
||||
<p>Overview &gt; CPU (ovenste tab) app aanvinken &ndash;&gt; filtert alles</p> |
||||
|
||||
<h3 id="netstat"><em>Netstat</em></h3> |
||||
|
||||
<p><code>netstat -abo &gt; C:\temp\log.txt</code></p> |
||||
|
||||
<h3 id="chocolate"><em>Chocolate</em></h3> |
||||
|
||||
<p>C:\ProgramData\chocolatey\bin\Procmon.exe |
||||
&ndash;&gt; selecteer lijn+kolom &gt; exclude &lsquo;name&rsquo; (=grep -v) / include &lsquo;name&rsquo; (=grep)</p> |
||||
|
||||
<h3 id="usefull-programs"><em>Usefull programs</em></h3> |
||||
|
||||
<ul> |
||||
<li>TreeView</li> |
||||
<li>VBluescreenviewer</li> |
||||
<li>Sysinternals</li> |
||||
<li>Zabbix</li> |
||||
<li>VMware events</li> |
||||
<li>BareTail</li> |
||||
<li>choco install</li> |
||||
<li>choco list -lo (view choco installed programs)</li> |
||||
<li>telnet 12.34.56.78 900</li> |
||||
<li>powershell: <code>stop service 'name'</code></li> |
||||
</ul> |
||||
|
||||
<h3 id="eventid-s"><em>EventID&rsquo;s</em></h3> |
||||
|
||||
<ul> |
||||
<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li> |
||||
<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li> |
||||
<li>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</li> |
||||
<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li> |
||||
|
||||
<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. |
||||
Add to that a couple more from the Server Fault answers listed in my OP:</p></li> |
||||
|
||||
<li><p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p></li> |
||||
|
||||
<li><p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li> |
||||
</ul> |
||||
|
||||
<h3 id="powershell-1"><em>PowerShell</em></h3> |
||||
|
||||
<pre><code class="language-PowerShell">$filter = &quot;*abbix*&quot; |
||||
get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Dont Let Your Application Interfere With Letsencrypt</title> |
||||
<link>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:46:41 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</guid> |
||||
<description> |
||||
|
||||
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Vue Js</title> |
||||
<link>https://hagfi.sh/development/vue-js/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:44:46 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/development/vue-js/</guid> |
||||
<description> |
||||
|
||||
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> |
||||
</description> |
||||
</item> |
||||
|
||||
<item> |
||||
<title>Luks Encryption</title> |
||||
<link>https://hagfi.sh/administration/luks-encryption/</link> |
||||
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate> |
||||
|
||||
<guid>https://hagfi.sh/administration/luks-encryption/</guid> |
||||
<description> |
||||
|
||||
<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done |
||||
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) |
||||
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') |
||||
root@server:/dev/centos # echo ${NEWDISK} |
||||
sdd |
||||
root@server:/dev/centos # echo ${VGROUP} |
||||
centos |
||||
root@server:/dev/centos # pvcreate /dev/${NEWDISK} |
||||
Physical volume &quot;/dev/sdd&quot; successfully created. |
||||
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} |
||||
Volume group &quot;centos&quot; successfully extended |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos |
||||
Logical volume &quot;encrypted&quot; created. |
||||
</code></pre> |
||||
|
||||
<h2 id="encrypt-the-partition">Encrypt the partition</h2> |
||||
|
||||
<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted |
||||
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-mountpoint">Create a mountpoint</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # mkdir /encrypted |
||||
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted |
||||
</code></pre> |
||||
|
||||
<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2> |
||||
|
||||
<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 |
||||
root@server:/dev/mapper # chmod 0400 /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="unmount-and-add-the-key">Unmount and add the key</h2> |
||||
|
||||
<pre><code>root@server:/ # umount /encrypted |
||||
root@server:/ # cryptsetup luksClose luks-encrypted |
||||
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey |
||||
</code></pre> |
||||
|
||||
<h2 id="get-uuid">Get UUID</h2> |
||||
|
||||
<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted |
||||
/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot; |
||||
</code></pre> |
||||
|
||||
<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2> |
||||
|
||||
<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks |
||||
</code></pre> |
||||
</description> |
||||
</item> |
||||
|
||||
</channel> |
||||
</rss> |
||||
@ -0,0 +1,18 @@
|
||||
/* |
||||
Ridiculously Responsive Social Sharing Buttons |
||||
Team: @dbox, @joshuatuscan |
||||
Site: http://www.kurtnoble.com/labs/rrssb
|
||||
Twitter: @therealkni |
||||
|
||||
___ ___ |
||||
/__/| /__/\ ___ |
||||
| |:| \ \:\ / /\ |
||||
| |:| \ \:\ / /:/ |
||||
__| |:| _____\__\:\ /__/::\ |
||||
/__/\_|:|____ /__/::::::::\ \__\/\:\__ |
||||
\ \:\/:::::/ \ \:\~~\~~\/ \ \:\/\ |
||||
\ \::/~~~~ \ \:\ ~~~ \__\::/ |
||||
\ \:\ \ \:\ /__/:/ |
||||
\ \:\ \ \:\ \__\/ |
||||
\__\/ \__\/ |
||||
*/(function(e,t,n){"use strict";var r=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=t("li",n).length,i=100/r;t("li",n).css("width",i+"%").attr("data-initwidth",i)})},i=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=parseFloat(t(n).width()),i=t("li",n).not(".small").first().width(),s=t("li.small",n).length;i>170&&s<1?t(n).addClass("large-format"):t(n).removeClass("large-format");r<200?t(n).removeClass("small-format").addClass("tiny-format"):t(n).removeClass("tiny-format")})},s=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=0,i=0,s,o,a=t("li.small",n).length;if(a===t("li",n).length){var f=a*42,l=parseFloat(t(n).width());s=t("li.small",n).first();o=parseFloat(t(s).attr("data-size"))+55;if(f+o<l){t(n).removeClass("small-format");t("li.small",n).first().removeClass("small");u()}}else{t("li",n).not(".small").each(function(e){var n=parseFloat(t(this).attr("data-size"))+55,s=parseFloat(t(this).width());r+=s;i+=n});var c=r-i;s=t("li.small",n).first();o=parseFloat(t(s).attr("data-size"))+55;if(o<c){t(s).removeClass("small");u()}}})},o=function(e){t(".rrssb-buttons").each(function(e){var n=t(this),r=t("li",n).nextAll(),i=r.length;t(t("li",n).get().reverse()).each(function(e,r){if(t(this).hasClass("small")===!1){var i=parseFloat(t(this).attr("data-size"))+55,o=parseFloat(t(this).width());if(i>o){var a=t("li",n).not(".small").last();t(a).addClass("small");u()}}--r||s()})});e===!0&&f(u)},u=function(){t(".rrssb-buttons").each(function(e){var n=t(this),i,s,o,u,a,f=t("li.small",n).length;if(f>0&&f!==t("li",n).length){t(n).removeClass("small-format");t("li.small",n).css("width","42px");o=f*42;i=t("li",n).not(".small").length;s=100/i;a=o/i;navigator.userAgent.indexOf("Chrome")>=0||navigator.userAgent.indexOf("Safari")>=0?u="-webkit-calc("+s+"% - "+a+"px)":navigator.userAgent.indexOf("Firefox")>=0?u="-moz-calc("+s+"% - "+a+"px)":u="calc("+s+"% - "+a+"px)";t("li",n).not(".small").css("width",u)}else if(f===t("li",n).length){t(n).addClass("small-format");r()}else{t(n).removeClass("small-format");r()}});i()},a=function(){t(".rrssb-buttons").each(function(e){t(this).addClass("rrssb-"+(e+1))});r();t(".rrssb-buttons li .text").each(function(e){var n=parseFloat(t(this).width());t(this).closest("li").attr("data-size",n)});o(!0)},f=function(e){t(".rrssb-buttons li.small").removeClass("small");o();e()},l=function(t,r,i,s){var o=e.screenLeft!==n?e.screenLeft:screen.left,u=e.screenTop!==n?e.screenTop:screen.top,a=e.innerWidth?e.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,f=e.innerHeight?e.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,l=a/2-i/2+o,c=f/3-s/3+u,h=e.open(t,r,"scrollbars=yes, width="+i+", height="+s+", top="+c+", left="+l);e.focus&&h.focus()},c=function(){var e={};return function(t,n,r){r||(r="Don't call this twice without a uniqueId");e[r]&&clearTimeout(e[r]);e[r]=setTimeout(t,n)}}();t(".rrssb-buttons a.popup").on("click",function(e){var n=t(this);l(n.attr("href"),n.find(".text").html(),580,470);e.preventDefault()});t(e).resize(function(){f(u);c(function(){f(u)},200,"finished resizing")});t(document).ready(function(){a()})})(window,jQuery); |
||||
@ -0,0 +1,108 @@
|
||||
summaryInclude=60; |
||||
var fuseOptions = { |
||||
shouldSort: true, |
||||
includeMatches: true, |
||||
threshold: 0.0, |
||||
tokenize:true, |
||||
location: 0, |
||||
distance: 100, |
||||
maxPatternLength: 32, |
||||
minMatchCharLength: 1, |
||||
keys: [ |
||||
{name:"title",weight:0.8}, |
||||
{name:"contents",weight:0.5}, |
||||
{name:"tags",weight:0.3}, |
||||
{name:"categories",weight:0.3} |
||||
] |
||||
}; |
||||
|
||||
|
||||
var searchQuery = param("s"); |
||||
if(searchQuery){ |
||||
$("#search-query").val(searchQuery); |
||||
executeSearch(searchQuery); |
||||
}else { |
||||
$('#search-results').append("<p>Please enter a word or phrase above</p>"); |
||||
} |
||||
|
||||
|
||||
|
||||
function executeSearch(searchQuery){ |
||||
$.getJSON( "/index.json", function( data ) { |
||||
var pages = data; |
||||
var fuse = new Fuse(pages, fuseOptions); |
||||
var result = fuse.search(searchQuery); |
||||
console.log({"matches":result}); |
||||
if(result.length > 0){ |
||||
populateResults(result); |
||||
}else{ |
||||
$('#search-results').append("<p>No matches found</p>"); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
function populateResults(result){ |
||||
$.each(result,function(key,value){ |
||||
var contents= value.item.contents; |
||||
var snippet = ""; |
||||
var snippetHighlights=[]; |
||||
var tags =[]; |
||||
if( fuseOptions.tokenize ){ |
||||
snippetHighlights.push(searchQuery); |
||||
}else{ |
||||
$.each(value.matches,function(matchKey,mvalue){ |
||||
if(mvalue.key == "tags" || mvalue.key == "categories" ){ |
||||
snippetHighlights.push(mvalue.value); |
||||
}else if(mvalue.key == "contents"){ |
||||
start = mvalue.indices[0][0]-summaryInclude>0?mvalue.indices[0][0]-summaryInclude:0; |
||||
end = mvalue.indices[0][1]+summaryInclude<contents.length?mvalue.indices[0][1]+summaryInclude:contents.length; |
||||
snippet += contents.substring(start,end); |
||||
snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0],mvalue.indices[0][1]-mvalue.indices[0][0]+1)); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
if(snippet.length<1){ |
||||
snippet += contents.substring(0,summaryInclude*2); |
||||
} |
||||
//pull template from hugo templarte definition
|
||||
var templateDefinition = $('#search-result-template').html(); |
||||
//replace values
|
||||
var output = render(templateDefinition,{key:key,title:value.item.title,link:value.item.permalink,tags:value.item.tags,categories:value.item.categories,snippet:snippet}); |
||||
$('#search-results').append(output); |
||||
|
||||
$.each(snippetHighlights,function(snipkey,snipvalue){ |
||||
$("#summary-"+key).mark(snipvalue); |
||||
}); |
||||
|
||||
}); |
||||
} |
||||
|
||||
function param(name) { |
||||
return decodeURIComponent((location.search.split(name + '=')[1] || '').split('&')[0]).replace(/\+/g, ' '); |
||||
} |
||||
|
||||
function render(templateString, data) { |
||||
var conditionalMatches,conditionalPattern,copy; |
||||
conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g; |
||||
//since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop
|
||||
copy = templateString; |
||||
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) { |
||||
if(data[conditionalMatches[1]]){ |
||||
//valid key, remove conditionals, leave contents.
|
||||
copy = copy.replace(conditionalMatches[0],conditionalMatches[2]); |
||||
}else{ |
||||
//not valid, remove entire section
|
||||
copy = copy.replace(conditionalMatches[0],''); |
||||
} |
||||
} |
||||
templateString = copy; |
||||
//now any conditionals removed we can do simple substitution
|
||||
var key, find, re; |
||||
for (key in data) { |
||||
find = '\\$\\{\\s*' + key + '\\s*\\}'; |
||||
re = new RegExp(find, 'g'); |
||||
templateString = templateString.replace(re, data[key]); |
||||
} |
||||
return templateString; |
||||
} |
||||
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/letsencrypt/</loc> |
||||
<lastmod>2018-08-25T22:08:15+02:00</lastmod> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/mysql_tuner/</loc> |
||||
<lastmod>2018-08-25T22:08:15+02:00</lastmod> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/windows_troubleshooting/</loc> |
||||
<lastmod>2018-08-25T22:08:15+02:00</lastmod> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</loc> |
||||
<lastmod>2018-08-23T22:46:41+02:00</lastmod> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/development/vue-js/</loc> |
||||
<lastmod>2018-08-23T22:44:46+02:00</lastmod> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/luks-encryption/</loc> |
||||
<lastmod>2018-08-23T22:08:15+02:00</lastmod> |
||||
<priority>0.1</priority> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/administration/</loc> |
||||
<lastmod>2018-08-25T22:08:15+02:00</lastmod> |
||||
<priority>0</priority> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/development/</loc> |
||||
<lastmod>2018-08-23T22:44:46+02:00</lastmod> |
||||
<priority>0</priority> |
||||
</url> |
||||
|
||||
<url> |
||||
<loc>https://hagfi.sh/</loc> |
||||
<lastmod>2018-08-25T22:08:15+02:00</lastmod> |
||||
<priority>0</priority> |
||||
</url> |
||||
|
||||
</urlset> |
||||
|
After Width: | Height: | Size: 570 B |
@ -0,0 +1,13 @@
|
||||
Copyright 2014 Tom Maiaroto |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
@ -0,0 +1,157 @@
|
||||
Red Lounge |
||||
=========== |
||||
|
||||
NOTICE: This theme is no longer maintained (or very slowly maintanied). Unless a pull request comes in that makes sense to merge, don't expect updates. Hugo has since updated a bit since this theme was created. So there may be some incompatibilities or missing features (certainly missing features). Please feel free to submit pull requests. Also if anyone is interested in maintaning the theme, please let me know. Thanks! |
||||
|
||||
This is an open-source Hugo theme designed by [@shift8creative](http://www.twitter.com/shift8creative) to be responsive and clean. It uses Pure.css and contains a few web fonts from Google as well as Font Awesome icons. |
||||
So despite it being simple, it has a lot of flexibility in terms of typography and design elements. It's also quite configurable as it has a few variables to change the |
||||
appearance and features of the pages. By default, excess features (and JavaScript) is not included. |
||||
|
||||
## Configuration and Options |
||||
|
||||
### Sidebar Title & Tagline Params |
||||
|
||||
The sidebar can be configured with your main site config using params. For example, in ```config.toml``` |
||||
|
||||
``` |
||||
[params] |
||||
sidebartitle = "My Site" |
||||
sidebartagline = "Is super awesome" |
||||
sidebarphoto = "/img/photo.png" |
||||
``` |
||||
|
||||
This three properites will not be shown if not set. You will want to keep these lines short since there's limited space. |
||||
Alternatively you could add custom HTML using the ```sidebarheader.html``` partial and keep those values empty strings. |
||||
|
||||
### Google Analytics |
||||
|
||||
Google Analytics can be configured with your main site config by entering the Google Analytics tracking id under params. For example, in ```config.toml``` |
||||
|
||||
``` |
||||
[params] |
||||
gaid = "UA-XXXXXXXX-X" |
||||
``` |
||||
|
||||
### Menus |
||||
|
||||
There are a few menus this theme allows you to define (all optional) in your main config. |
||||
|
||||
Main - This menu is pretty basic and goes on the left panel under the site title and description. It contains red markers to separate items and call attention to the |
||||
fact that it is more important than the other lists/menus that you may have on your site. It is optional, but always shows a link to the home page. |
||||
This would be a good place to link to your various sections. |
||||
|
||||
``` |
||||
[[menu.main]] |
||||
name = "Blog" |
||||
url = "/posts" |
||||
``` |
||||
|
||||
|
||||
Social - This menu goes underneath the main menu and was originally designed to contain links out to social media accounts, RSS, etc. making use of Font Awesome. |
||||
However, you can use it for whatever you want. Just keep in mind space is limited here on the left panel. |
||||
|
||||
``` |
||||
[[menu.social]] |
||||
pre = "<i class='fa fa-twitter'></i>" |
||||
url = "http://www.twitter.com/shift8creative" |
||||
identifier = "twitter" |
||||
``` |
||||
|
||||
Footer - The footer menu might also contain links to social media accounts...It's up to you. It appears right above the copyright notice at the bottom of each page. |
||||
This menu is simply plain text links centered and they are gray to match the footer. So there's less attention being drawn here. Perhaps good for notices, terms of service, etc. |
||||
|
||||
``` |
||||
[[menu.footer]] |
||||
name = "Blog" |
||||
url = "/posts" |
||||
``` |
||||
|
||||
### Categories |
||||
|
||||
Some assembly required here. |
||||
|
||||
```.Params.categories``` coming from front-matter are displayed as tags on list pages with boxes. By default they are all going to be gray with white text. The coloring is up to you. |
||||
|
||||
Each label will have the following class: ```class="post-category post-category-{{ . | urlize }}"``` |
||||
|
||||
Note the name is going to be urlized. So for example: ```post-category-technology``` or ```post-category-golang``` and so on. This allows you to create your own CSS around the |
||||
categories you end up defining. You can then set the background color to be something specific and then all instances of that category label will match. |
||||
|
||||
You can easily include a categories CSS file, without modifying template partials, by using the site config params. Something like the following: |
||||
|
||||
``` |
||||
[params] |
||||
categoriescss = "/css/my-categories.css" |
||||
``` |
||||
|
||||
This will be included in the header.html file before headend.html partial, so you can still include additional code in that partial afterward. |
||||
|
||||
### Comments |
||||
|
||||
Comments use Disqus, so the main config needs to define ```disqusShortname``` like normal. However, each page can disable comments from appearing with front matter. Simply set |
||||
```nocomment = true``` and they will be hidden. |
||||
|
||||
### Lightbox |
||||
|
||||
Lightbox is included with the theme but won't be available for use (not even linked in the HTML) unless you enable it. This way it stays out of the way and saves on bandwidth. |
||||
Should you decide you want to use it, simply add to your front-matter: ```lightbox = true``` and then in your markdown you'll need add links with a ```data-lightbox``` attribute. |
||||
Markdown wants to add titles when you add quotes so the syntax is a little weird. Alternatively, you can use HTML (which is likely easier in this case). So the following should |
||||
use images in your ```static``` directory: |
||||
|
||||
``` |
||||
<a href="/image.jpg" title="" data-lightbox="set1" data-title="This is my caption"><img src="/image-thumbnail.jpg" alt=""></a> |
||||
``` |
||||
|
||||
Also note that Lightbox requires jQuery, so turning this on for a page or archetype will also link jQuery in the head section of your pages from Google's CDN. |
||||
|
||||
### Hiding & Showing Things |
||||
|
||||
Comments can be hidden on a per page basis with ```nocomment = true``` but there's also some other things that can be hidden. Sometimes simply by not defining them, other times |
||||
by explicitly setting variables. They are as follows: |
||||
|
||||
- ```nodate = true``` Hides the date on a page |
||||
- ```noauthor = true``` Hides the author (which may simply be defined per page, but also could be set higher up in the config, so this overrides) |
||||
- ```noread = true``` Hides the read time displayed on list pages |
||||
- ```nopaging = true``` Hides the next/prev links that navigate through pages |
||||
- ```notoc = true``` Hides the table of contents from a page |
||||
- ```totop = true``` Shows a "To Top" link, fixed in the top right of the page after scrolling beyond 1000px, that takes the user back to the top of the page (not shown by default) |
||||
- ```socialsharing = true``` Shows social media sharing buttons from a partial template (which can be overwritten) |
||||
|
||||
### Other Params |
||||
|
||||
Aside from the above variables that hide/show things, there are a few other variables that this theme will look for and use. These can be placed in any front matter. In some cases |
||||
you'll want to define these in the archetypes so you don't need to keep defining the values. These are all optional of course. |
||||
|
||||
- ```ogimage``` OpenGraph image tag |
||||
- ```ogtitle``` OpenGraph title tag (if not set, will use ```.Title```) |
||||
- ```ogdescription``` OpenGraph description tag (if not set, will use ```.Description``` - also used the same way for meta description) |
||||
- ```banner``` A banner image for a page that sits above the title and stretches across the width of the page |
||||
- ```bannerheight``` An optional height for the banner image wrapper to help cut off larger images (specified as just a number, none by default) |
||||
- ```bannerfill``` If set true, this will attempt to fill the available width of the content area with the banner image by applying a 100% width to the image style |
||||
- ```bannerinline``` Use this instead to place a banner image after the title, author, tags, etc. which floats to the right of the content (does not use the fill/height params) |
||||
- ```thumbnail``` Set this to an image path if you want to show a thumbnail with pages in the list view; originally intended for author avatars, any small image could work (50x50 pixels) |
||||
- ```author``` The author name |
||||
- ```authorlink``` A link for the author |
||||
- ```authorlinktarget``` The link target, ie. "_blank" (useful if the link goes to an external site or something) |
||||
- ```authortwitter``` The full URL to the author's Twitter profile (opens in a new window) |
||||
- ```authorlinkedin``` The full URL to the author's LinkedIn profile (opens in a new window) |
||||
- ```authorfacebook``` The full URL to the author's Facebook page/profile (opens in a new window) |
||||
- ```authorgoogleplus``` The full URL to the author's Google+ page/profile (opens in a new window) |
||||
|
||||
### Template Partials |
||||
|
||||
There are a few partials being used so that key areas can be easily overwritten. |
||||
|
||||
- ```doctype.html``` This contains the HTML document declaration and you may wish to change it from the default value of english for language, add namespaces, etc. |
||||
- ```header.html``` This contains the ```<head>``` portion of the page |
||||
- ```meta.html``` This contains some basic meta tags, feel free to modify as needed (within header.html) |
||||
- ```og.html``` OpenGraph only meta tags (within header.html) |
||||
- ```headend.html``` This easily provides the ability to add custom style sheets and JavaScript right before ```</head>``` to override styles, etc. (within header.html) |
||||
- ```authorsocial.html``` If an author is set this template partial will be used to optionally show links to their social media profiles if also set (within single.html) |
||||
- ```socialsharing.html``` Allows you to change what's displayed when ```socialsharing = true``` |
||||
- ```sidebar.html``` The sidebar which is already pretty customizable with site params and menus, but can also easily be changed if need be |
||||
- ```sidebarheader.html``` Placed above the h1 and h2 elements in the sidebar (which will appear if your site config was set), allowing for further sidebar header adjustments |
||||
- ```singletop.html``` Placed at the top of the page for single.html (but under the banner) |
||||
- ```listtop.html``` Placed at the top of the page for list.html |
||||
- ```footer.html``` The footer |
||||
- ```bodyend.html``` Right before ```</body>``` (within list.html, single.html, and index.html - be sure to include it when/if overwriting with your own index.html) |
||||
@ -0,0 +1,6 @@
|
||||
+++ |
||||
Description = "" |
||||
Tags = ["Development", "golang"] |
||||
Categories = ["Development", "GoLang"] |
||||
menu = "main" |
||||
+++ |
||||
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 60 KiB |
@ -0,0 +1,63 @@
|
||||
{{ partial "header.html" . }} |
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
{{ partial "sidebar.html" . }} |
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
{{ partial "listtop.html" . }} |
||||
|
||||
<div class="posts"> |
||||
{{ range .Data.Pages }} |
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
{{ if .Params.thumbnail }} |
||||
<div class="post-avatar-wrapper"> |
||||
<img class="post-avatar" alt="" src="{{ .Params.thumbnail }}"> |
||||
</div> |
||||
{{ end }} |
||||
<h1 class="post-title"> |
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
{{ if not .Params.nodate }} |
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>{{ .Date.Format "2" }}</sup></span><span class="post-date-separator">/</span><span class="post-date-month">{{ .Date.Format "Jan" }}</span> <span class="post-date-year">{{ .Date.Format "2006" }}</span> |
||||
</span> |
||||
{{ end }} |
||||
{{ if not .Params.noauthor }} |
||||
{{ if .Params.author }}By <a class="post-author" {{ if .Params.authorlink }}href="{{ .Params.authorlink }}"{{ end }}>{{ .Params.author }}</a>{{ end }} |
||||
{{ end }} |
||||
{{ if not .Params.noread }} |
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>{{.ReadingTime}} min. read</em></span> |
||||
{{ end }} |
||||
{{ if .Params.categories }} |
||||
<div class="post-categories"> |
||||
{{ $Site := .Site }} |
||||
{{ range .Params.categories }} |
||||
<a class="post-category post-category-{{ . | urlize }}" href="{{ $Site.BaseURL}}/categories/{{ . | urlize }}">{{ . }}</a> |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
</p> |
||||
{{ if .Truncated }} |
||||
<article class="post-summary"> |
||||
{{ .Summary }} |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="{{ .RelPermalink }}"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
{{ else }} |
||||
{{ .Content }} |
||||
{{ end }} |
||||
</section> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
{{ partial "footer.html" . }} |
||||
</div> |
||||
</div> |
||||
{{ partial "bodyend.html" . }} |
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,138 @@
|
||||
{{ partial "header.html" . }} |
||||
<body> |
||||
{{ if .Params.totop }} |
||||
<div id="nav-to-top"> |
||||
<span class="decorative-marker">//</span><a href="#top">To Top</a> |
||||
</div> |
||||
{{ end }} |
||||
|
||||
<div id="layout" class="pure-g"> |
||||
{{ partial "sidebar.html" . }} |
||||
|
||||
{{ if .Params.banner }} |
||||
<div class="content-banner-image pure-u-1 pure-u-md-3-4" style="{{ if .Params.bannerheight }}height: {{ .Params.bannerheight }}px;{{ end }}"> |
||||
<img src="{{ .Params.banner }}" class="pure-img" style="{{ if .Params.bannerfill }}width: 100%;{{ end }}" /> |
||||
</div> |
||||
{{ end }} |
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
{{ partial "singletop.html" . }} |
||||
|
||||
{{ if not .Params.notoc }} |
||||
{{ if .TableOfContents }} |
||||
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
||||
<small class="toc-label">Contents</small> |
||||
{{ .TableOfContents }} |
||||
</div> |
||||
{{ end }} |
||||
{{ end }} |
||||
<section class="post"> |
||||
<h1 class="post-title"> |
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a> |
||||
</h1> |
||||
<h3 class="post-subtitle"> |
||||
{{ .Params.subtitle }} |
||||
</h3> |
||||
{{ if not .Params.nodate }} |
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>{{ .Date.Format "2" }}</sup></span><span class="post-date-separator">/</span><span class="post-date-month">{{ .Date.Format "Jan" }}</span> <span class="post-date-year">{{ .Date.Format "2006" }}</span> |
||||
</span> |
||||
{{ end }} |
||||
{{ if not .Params.noauthor }} |
||||
{{ if .Params.author }} |
||||
<span class="post-author-single">By <a class="post-author" {{ if .Params.authorlink }}href="{{ .Params.authorlink }}"{{ end }} target="{{ .Params.authorlinktarget }}">{{ .Params.author }}</a></span> |
||||
{{ partial "authorsocial.html" . }} |
||||
{{ end }} |
||||
{{ end }} |
||||
|
||||
{{ $Site := .Site }} |
||||
{{ if .Params.categories }} |
||||
<div class="post-categories"> |
||||
{{ range .Params.categories }} |
||||
<a class="post-category post-category-{{ . | urlize }}" href="{{ $Site.BaseURL}}/categories/{{ . | urlize }}">{{ . }}</a> |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
|
||||
{{ if .Params.socialsharing }} |
||||
{{ partial "socialsharing.html" . }} |
||||
{{ end }} |
||||
|
||||
{{ if .Params.bannerinline }} |
||||
<img src="{{ .Params.bannerinline }}" class="pure-img content-banner-image-inline" |
||||
style="{{ if .Params.bannerfill }}width: 100%;{{ end }} |
||||
{{ if .Params.bannerheight }}height: {{ .Params.bannerheight }}px;{{ end }}" /> |
||||
{{ end }} |
||||
|
||||
{{ .Content }} |
||||
|
||||
{{ if .Params.socialsharing }} |
||||
{{ partial "socialsharing.html" . }} |
||||
{{ end }} |
||||
|
||||
{{ if .Params.tags }} |
||||
<div class="tags-list"> |
||||
<span class="dark-red">Tags</span><span class="decorative-marker">//</span> |
||||
{{ range .Params.tags }} |
||||
<a class="post-tag post-tag-{{ . | urlize }}" href="{{ $Site.BaseURL}}/tags/{{ . | urlize }}">{{ . }}</a>, |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
|
||||
{{ if not .Params.nopaging }} |
||||
<div class="paging"> |
||||
<span class="paging-label">More Reading</span> |
||||
{{ if .Prev }} |
||||
<div class="paging-newer"> |
||||
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="{{ .Prev.RelPermalink }}">{{ .Prev.Title }}</a> |
||||
</div> |
||||
{{ end }} |
||||
|
||||
{{ if .Next }} |
||||
<div class="paging-older"> |
||||
<span class="dark-red">Older</span><span class="decorative-marker">//</span> |
||||
<a class="paging-link" href="{{ .Next.RelPermalink }}">{{ .Next.Title }}</a> |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
</section> |
||||
{{ if not .Params.nocomment }} |
||||
{{ template "_internal/disqus.html" . }} |
||||
{{ end }} |
||||
|
||||
{{ partial "footer.html" . }} |
||||
</div> |
||||
</div> |
||||
{{ if .Params.totop }} |
||||
<script type="text/javascript"> |
||||
onscroll = function() { |
||||
var toTopVisible = false; |
||||
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; |
||||
if (scrollTop > 1000) { |
||||
if (!toTopVisible) { |
||||
document.getElementById('nav-to-top').style.display = 'block'; |
||||
} |
||||
} else { |
||||
if (scrollTop < 1000 || toTopVisible) { |
||||
document.getElementById('nav-to-top').style.display = 'none'; |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
{{ end }} |
||||
|
||||
{{ if .Params.socialsharing }} |
||||
<script type="text/javascript"> |
||||
function popupShare(url) { |
||||
window.open(url, '_blank', 'scrollbars,resizable,height=525,width=600'); |
||||
return false; |
||||
} |
||||
</script> |
||||
{{ end }} |
||||
|
||||
{{ partial "bodyend.html" . }} |
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,41 @@
|
||||
{{ partial "header.html" . }} |
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
{{ partial "sidebar.html" . }} |
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
{{ partial "listtop.html" . }} |
||||
<div id="cloud"> |
||||
<vue-word-cloud |
||||
:words="[['romance', 19], ['horror', 3], ['fantasy', 7], ['adventure', 3]]" |
||||
:color="([, weight]) => weight > 10 ? 'DeepPink' : weight > 5 ? 'RoyalBlue' : 'Indigo'" |
||||
font-family="Roboto" |
||||
/> |
||||
</div> |
||||
|
||||
{{ partial "footer.html" . }} |
||||
</div> |
||||
</div> |
||||
{{ partial "bodyend.html" . }} |
||||
|
||||
<script> |
||||
var cloud = new Vue({ |
||||
el: '#cloud', |
||||
data: { |
||||
result: [], |
||||
}, |
||||
mounted() { |
||||
let self = this |
||||
axios.get('/index.json') |
||||
.then(function (response) { |
||||
self.result = response.data |
||||
}) |
||||
.catch(function (error) { |
||||
}) |
||||
} |
||||
}) |
||||
</script> |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,63 @@
|
||||
{{ partial "header.html" . }} |
||||
<body> |
||||
<div id="layout" class="pure-g"> |
||||
{{ partial "sidebar.html" . }} |
||||
|
||||
<div class="content pure-u-1 pure-u-md-3-4"> |
||||
<a name="top"></a> |
||||
{{ partial "listtop.html" . }} |
||||
|
||||
<div class="posts"> |
||||
{{ $Site := .Site }} |
||||
{{ range .Data.Pages }} |
||||
<section class="post"> |
||||
<header class="post-header"> |
||||
{{ if .Params.thumbnail }} |
||||
<div class="post-avatar-wrapper"> |
||||
<img class="post-avatar" alt="" src="{{ .Params.thumbnail }}"> |
||||
</div> |
||||
{{ end }} |
||||
<h1 class="post-title"> |
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a> |
||||
</h1> |
||||
</header> |
||||
<p class="post-meta"> |
||||
{{ if not .Params.nodate }} |
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup>{{ .Date.Format "2" }}</sup></span><span class="post-date-separator">/</span><span class="post-date-month">{{ .Date.Format "Jan" }}</span> <span class="post-date-year">{{ .Date.Format "2006" }}</span> |
||||
</span> |
||||
{{ end }} |
||||
{{ if not .Params.noauthor }} |
||||
{{ if .Params.author }}By <a class="post-author" {{ if .Params.authorlink }}href="{{ .Params.authorlink }}"{{ end }}>{{ .Params.author }}</a>{{ end }} |
||||
{{ end }} |
||||
{{ if not .Params.noread }} |
||||
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>{{.ReadingTime}} min. read</em></span> |
||||
{{ end }} |
||||
{{ if .Params.categories }} |
||||
<div class="post-categories"> |
||||
{{ range .Params.categories }} |
||||
<a class="post-category post-category-{{ . | urlize }}" href="{{ $Site.BaseURL }}/categories/{{ . | urlize }}">{{ . }}</a> |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
</p> |
||||
{{ if .Truncated }} |
||||
<article class="post-summary"> |
||||
{{ .Summary }} |
||||
</article> |
||||
<div class="read-more-link"> |
||||
<a href="{{ .RelPermalink }}"><span class="read-more-slashes">//</span>Read More...</a> |
||||
</div> |
||||
{{ else }} |
||||
{{ .Content }} |
||||
{{ end }} |
||||
</section> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
{{ partial "footer.html" . }} |
||||
</div> |
||||
</div> |
||||
{{ partial "bodyend.html" . }} |
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,12 @@
|
||||
{{ if .Params.authorfacebook }} |
||||
<span class="post-author-social post-author-facebook"><a href="{{ .Params.authorfacebook }}" target="_blank"><i class="fa fa-facebook"></i></a></span> |
||||
{{ end }} |
||||
{{ if .Params.authorgoogleplus }} |
||||
<span class="post-author-social post-author-google-plus"><a href="{{ .Params.authorgoogleplus }}" target="_blank"><i class="fa fa-google-plus"></i></a></span> |
||||
{{ end }} |
||||
{{ if .Params.authorlinkedin }} |
||||
<span class="post-author-social post-author-linkedin"><a href="{{ .Params.authorlinkedin }}" target="_blank"><i class="fa fa-linkedin"></i></a></span> |
||||
{{ end }} |
||||
{{ if .Params.authortwitter }} |
||||
<span class="post-author-social post-author-twitter"><a href="{{ .Params.authortwitter }}" target="_blank"><i class="fa fa-twitter"></i></a></span> |
||||
{{ end }} |
||||
@ -0,0 +1,77 @@
|
||||
<script> |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
data: { |
||||
fuse: null, |
||||
search: "", |
||||
result: [], |
||||
index: [], |
||||
selected: 0 |
||||
}, |
||||
mounted() { |
||||
let self = this |
||||
|
||||
// Global listener for keypress events, lets focus that search |
||||
window.addEventListener("keypress", function(e) { |
||||
self.$refs.searchInput.focus() |
||||
}) |
||||
|
||||
let options = { |
||||
shouldSort: true, |
||||
threshold: 0.6, |
||||
location: 0, |
||||
distance: 100, |
||||
maxPatternLength: 32, |
||||
minMatchCharLength: 1, |
||||
keys: [ |
||||
"title", |
||||
"author", |
||||
"date", |
||||
"content" |
||||
] |
||||
} |
||||
axios.get('/index.json') |
||||
.then(function (response) { |
||||
self.index = response.data |
||||
self.fuse = new Fuse(response.data, options) |
||||
}) |
||||
.catch(function (error) { |
||||
}) |
||||
}, |
||||
watch: { |
||||
result(nval, oval) { |
||||
nval.length > 0 ? this.pointer(0) : this.pointer(-1) |
||||
}, |
||||
search(nval, oval) { |
||||
this.result = this.fuse.search(nval) |
||||
} |
||||
}, |
||||
methods: { |
||||
navigate(val) { |
||||
switch (val) { |
||||
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break; |
||||
case -1: if (this.selected > 0 ) { this.selected-- }; break; |
||||
default: window.location.href = val; break; |
||||
} |
||||
this.pointer(this.selected) |
||||
}, |
||||
pointer(selected) { |
||||
let self = this |
||||
|
||||
if (selected >= 0) { |
||||
Vue.nextTick().then(function() { |
||||
let height = self.$refs.resultItem[selected].clientHeight |
||||
let top = self.$refs.resultItem[selected].getBoundingClientRect().top |
||||
let left = self.$refs.resultItem[selected].getBoundingClientRect().left |
||||
|
||||
self.$refs.resultPoint.style.top = (top+height/2)+'px' |
||||
self.$refs.resultPoint.style.left = (left-20)+'px' |
||||
}) |
||||
} else { |
||||
this.$refs.resultPoint.style.left = '-50px' |
||||
return |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
@ -0,0 +1,12 @@
|
||||
<div class="footer"> |
||||
<hr class="thin" /> |
||||
<div class="pure-menu pure-menu-horizontal pure-menu-open"> |
||||
<ul class="footer-menu"> |
||||
{{ range .Site.Menus.footer }} |
||||
<li><a href="{{.URL}}">{{ .Name }}</a></li> |
||||
{{ end }} |
||||
</ul> |
||||
</div> |
||||
|
||||
<p>{{ with .Site.Params.Copyright }}{{ . | safeHTML }}{{ else }}© {{now.Format "2006"}}. All rights reserved.{{end}}</p> |
||||
</div> |
||||
@ -0,0 +1,11 @@
|
||||
{{ if .Site.Params.gaid }} |
||||
<script> |
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
||||
|
||||
ga('create', {{ .Site.Params.gaid }}, 'auto'); |
||||
ga('send', 'pageview'); |
||||
</script> |
||||
{{ end }} |
||||
@ -0,0 +1,58 @@
|
||||
{{ partial "doctype.html" . }} |
||||
<head> |
||||
<title> |
||||
{{ .Title }}{{ if ne .Title .Site.Title }} // {{ .Site.Title }}{{ end }} |
||||
</title> |
||||
|
||||
{{ partial "meta.html" . }} |
||||
|
||||
{{ partial "og.html" . }} |
||||
|
||||
<!-- CSS --> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
||||
<!--[if lte IE 8]> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-old-ie-min.css"> |
||||
<![endif]--> |
||||
<!--[if gt IE 8]><!--> |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
||||
<!--<![endif]--> |
||||
<!--[if lt IE 9]> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script> |
||||
<![endif]--> |
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/redlounge.css"> |
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/prism.css"> |
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
||||
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
||||
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
||||
|
||||
<!-- Icons --> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
||||
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
||||
|
||||
<!-- RSS --> |
||||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> |
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script> |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script> |
||||
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script> |
||||
<script src="{{ .Site.BaseURL }}/js/prism.js"></script> |
||||
<!-- {{ partial "syntaxhighlight.html" . }} --> |
||||
|
||||
{{ if .Params.lightbox }} |
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/lightbox.css"> |
||||
<script src="{{ .Site.BaseURL }}/js/lightbox.min.js"></script> |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.categoriescss }} |
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.Params.categoriescss }}"> |
||||
{{ end }} |
||||
|
||||
{{ template "_internal/google_analytics.html" . }} |
||||
|
||||
{{ partial "headend.html" . }} |
||||
</head> |
||||
@ -0,0 +1,10 @@
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||
|
||||
<!-- Enable responsiveness on mobile devices--> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
||||
|
||||
<meta name="description" content="{{ .Description }}"> |
||||
<meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}"> |
||||
<meta name="author" content="{{ .Params.author }}"> |
||||
{{ .Hugo.Generator }} |
||||
@ -0,0 +1,8 @@
|
||||
<meta property="og:title" content="{{ if .Params.ogtitle }}{{ .Params.ogtitle }}{{ else }}{{ .Title }}{{ end }}" /> |
||||
<meta property="og:description" content="{{ if .Params.ogdescription }}{{ .Params.ogdescription }}{{ else }}{{ .Description }}{{ end }}" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:locale" content="en_US" /> |
||||
<meta property="og:url" content="{{ .Permalink }}" /> |
||||
{{ if .Params.ogimage }} |
||||
<meta property="og:image" content="{{ .Params.ogimage }}" /> |
||||
{{ end }} |
||||
@ -0,0 +1,80 @@
|
||||
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app"> |
||||
<div class="header"> |
||||
{{ partial "sidebarheader.html" . }} |
||||
|
||||
{{ if .Site.Params.sidebarphoto}} |
||||
<img src="{{.Site.Params.sidebarphoto}}" class="sidebarphoto"> |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.sidebartitle }}<h1 class="brand-title"><a href="/">{{ .Site.Params.sidebartitle }}</a></h1>{{ end }} |
||||
{{ if .Site.Params.sidebartagline }}<h2 class="brand-tagline">{{ .Site.Params.sidebartagline }}</h2>{{ end }} |
||||
|
||||
<div class="counters"> |
||||
<a class="counter" href="/">{{ len (.Site.RegularPages) }} |
||||
<div class="counter-sub">Documents</div> |
||||
</a> |
||||
<a class="counter" href="/tags">{{ len (.Site.Taxonomies.tags) }} |
||||
<div class="counter-sub">Tags</div> |
||||
</a> |
||||
<a class="counter" href="/categories">{{ len (.Site.Taxonomies.categories) }} |
||||
<div class="counter-sub">Categories</div> |
||||
</a> |
||||
</div> |
||||
|
||||
<nav class="nav"> |
||||
{{ if .Site.Params.menu }} |
||||
<ul class="nav-list"> |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="{{ .Site.BaseURL }}">Home</a></li> |
||||
{{ range .Site.Menus.main }} |
||||
<li class="nav-item"><span class="nav-item-separator">//</span><a href="{{ .URL }}">{{ .Name }}</a></li> |
||||
{{ end }} |
||||
</ul> |
||||
{{ end }} |
||||
</nav> |
||||
|
||||
<div class="search-wrapper"> |
||||
<input |
||||
type="text" |
||||
placeholder="Search ..." |
||||
v-model="search" |
||||
@keydown.down.prevent="navigate(1)" |
||||
@keydown.up.prevent="navigate(-1)" |
||||
@keyup.enter.prevent="navigate(result[selected].href)" |
||||
ref="searchInput" |
||||
class="search" |
||||
/> |
||||
|
||||
<svg height="100" width="100" ref="resultPoint" class="result-point"> |
||||
<circle cx="5" cy="5" r="5" fill="#FFF" /> |
||||
</svg> |
||||
|
||||
<ul class="result-items"> |
||||
<li v-for="r, i of result" class="result-item" ref="resultItem"> |
||||
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }"> |
||||
<div class="result-item-left"> |
||||
<span class="post-date"> |
||||
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span> |
||||
</span> |
||||
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template> |
||||
</div> |
||||
<div class="result-item-left"> |
||||
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a> |
||||
</div> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
{{ if .Site.Menus.social }} |
||||
<div class="social-buttons"> |
||||
{{ range .Site.Menus.social }} |
||||
{{ if .URL }} |
||||
<a href="{{ .URL }}" target="_blank">{{ .Pre }}</a> |
||||
{{ end }} |
||||
{{ end }} |
||||
|
||||
</div> |
||||
{{ end }} |
||||
|
||||
</div> |
||||
</div> |
||||
@ -0,0 +1,6 @@
|
||||
<div class="social-sharing"> |
||||
<a class="share-button-facebook" onClick="return popupShare(this.href);" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank"><i class="fa fa-facebook"><span>Like</span></i></a> |
||||
<a class="share-button-google-plus" onClick="return popupShare(this.href);" href="https://plus.google.com/share?url={{ .Permalink }}" target="_blank"><i class="fa fa-google-plus"><span>Google +1</span></i></a> |
||||
<a class="share-button-linkedin" onClick="return popupShare(this.href);" href="http://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}&summary={{ .Summary }}}&source={{ .Site.Title }}" target="_blank"><i class="fa fa-linkedin"><span>Share on LinkedIn</span></i></a> |
||||
<a class="share-button-twitter" onClick="return popupShare(this.href);" href="http://twitter.com/share?text={{ .Title }}&url={{ .Permalink }}" target="_blank"><i class="fa fa-twitter"><span>Tweet</span></i></a> |
||||
</div> |
||||
@ -0,0 +1,8 @@
|
||||
<!-- Syntax highlighting --> |
||||
{{ if isset .Site.Params "highlightStyle" }} |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/{{ .Site.Params.highlightStyle }}.min.css"> |
||||
{{ else }} |
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css"> |
||||
{{ end }} |
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script> |
||||
<script>hljs.initHighlightingOnLoad();</script> |
||||
@ -0,0 +1,210 @@
|
||||
/* Preload images */ |
||||
body:after { |
||||
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png); |
||||
display: none; |
||||
} |
||||
|
||||
.lightboxOverlay { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
z-index: 9999; |
||||
background-color: black; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); |
||||
opacity: 0.8; |
||||
display: none; |
||||
} |
||||
|
||||
.lightbox { |
||||
position: absolute; |
||||
left: 0; |
||||
width: 100%; |
||||
z-index: 10000; |
||||
text-align: center; |
||||
line-height: 0; |
||||
font-weight: normal; |
||||
} |
||||
|
||||
.lightbox .lb-image { |
||||
display: block; |
||||
height: auto; |
||||
max-width: inherit; |
||||
-webkit-border-radius: 3px; |
||||
-moz-border-radius: 3px; |
||||
-ms-border-radius: 3px; |
||||
-o-border-radius: 3px; |
||||
border-radius: 3px; |
||||
} |
||||
|
||||
.lightbox a img { |
||||
border: none; |
||||
} |
||||
|
||||
.lb-outerContainer { |
||||
position: relative; |
||||
background-color: white; |
||||
*zoom: 1; |
||||
width: 250px; |
||||
height: 250px; |
||||
margin: 0 auto; |
||||
-webkit-border-radius: 4px; |
||||
-moz-border-radius: 4px; |
||||
-ms-border-radius: 4px; |
||||
-o-border-radius: 4px; |
||||
border-radius: 4px; |
||||
} |
||||
|
||||
.lb-outerContainer:after { |
||||
content: ""; |
||||
display: table; |
||||
clear: both; |
||||
} |
||||
|
||||
.lb-container { |
||||
padding: 4px; |
||||
} |
||||
|
||||
.lb-loader { |
||||
position: absolute; |
||||
top: 43%; |
||||
left: 0; |
||||
height: 25%; |
||||
width: 100%; |
||||
text-align: center; |
||||
line-height: 0; |
||||
} |
||||
|
||||
.lb-cancel { |
||||
display: block; |
||||
width: 32px; |
||||
height: 32px; |
||||
margin: 0 auto; |
||||
background: url(../img/loading.gif) no-repeat; |
||||
} |
||||
|
||||
.lb-nav { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
height: 100%; |
||||
width: 100%; |
||||
z-index: 10; |
||||
} |
||||
|
||||
.lb-container > .nav { |
||||
left: 0; |
||||
} |
||||
|
||||
.lb-nav a { |
||||
outline: none; |
||||
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); |
||||
} |
||||
|
||||
.lb-prev, .lb-next { |
||||
height: 100%; |
||||
cursor: pointer; |
||||
display: block; |
||||
} |
||||
|
||||
.lb-nav a.lb-prev { |
||||
width: 34%; |
||||
left: 0; |
||||
float: left; |
||||
background: url(../img/prev.png) left 48% no-repeat; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |
||||
opacity: 0; |
||||
-webkit-transition: opacity 0.6s; |
||||
-moz-transition: opacity 0.6s; |
||||
-o-transition: opacity 0.6s; |
||||
transition: opacity 0.6s; |
||||
} |
||||
|
||||
.lb-nav a.lb-prev:hover { |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
|
||||
.lb-nav a.lb-next { |
||||
width: 64%; |
||||
right: 0; |
||||
float: right; |
||||
background: url(../img/next.png) right 48% no-repeat; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |
||||
opacity: 0; |
||||
-webkit-transition: opacity 0.6s; |
||||
-moz-transition: opacity 0.6s; |
||||
-o-transition: opacity 0.6s; |
||||
transition: opacity 0.6s; |
||||
} |
||||
|
||||
.lb-nav a.lb-next:hover { |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
|
||||
.lb-dataContainer { |
||||
margin: 0 auto; |
||||
padding-top: 5px; |
||||
*zoom: 1; |
||||
width: 100%; |
||||
-moz-border-radius-bottomleft: 4px; |
||||
-webkit-border-bottom-left-radius: 4px; |
||||
border-bottom-left-radius: 4px; |
||||
-moz-border-radius-bottomright: 4px; |
||||
-webkit-border-bottom-right-radius: 4px; |
||||
border-bottom-right-radius: 4px; |
||||
} |
||||
|
||||
.lb-dataContainer:after { |
||||
content: ""; |
||||
display: table; |
||||
clear: both; |
||||
} |
||||
|
||||
.lb-data { |
||||
padding: 0 4px; |
||||
color: #ccc; |
||||
} |
||||
|
||||
.lb-data .lb-details { |
||||
width: 85%; |
||||
float: left; |
||||
text-align: left; |
||||
line-height: 1.1em; |
||||
} |
||||
|
||||
.lb-data .lb-caption { |
||||
font-size: 13px; |
||||
font-weight: bold; |
||||
line-height: 1em; |
||||
} |
||||
|
||||
.lb-data .lb-number { |
||||
display: block; |
||||
clear: left; |
||||
padding-bottom: 1em; |
||||
font-size: 12px; |
||||
color: #999999; |
||||
} |
||||
|
||||
.lb-data .lb-close { |
||||
display: block; |
||||
float: right; |
||||
width: 30px; |
||||
height: 30px; |
||||
background: url(../img/close.png) top right no-repeat; |
||||
text-align: right; |
||||
outline: none; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); |
||||
opacity: 0.7; |
||||
-webkit-transition: opacity 0.2s; |
||||
-moz-transition: opacity 0.2s; |
||||
-o-transition: opacity 0.2s; |
||||
transition: opacity 0.2s; |
||||
} |
||||
|
||||
.lb-data .lb-close:hover { |
||||
cursor: pointer; |
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |
||||
opacity: 1; |
||||
} |
||||
@ -0,0 +1,259 @@
|
||||
/* PrismJS 1.15.0 |
||||
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+markup-templating+php+puppet+pug+yaml&plugins=line-numbers+toolbar+show-language */ |
||||
/** |
||||
* okaidia theme for JavaScript, CSS and HTML |
||||
* Loosely based on Monokai textmate theme by http://www.monokai.nl/ |
||||
* @author ocodia |
||||
*/ |
||||
|
||||
code[class*="language-"], |
||||
pre[class*="language-"] { |
||||
color: #f8f8f2; |
||||
background: none; |
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3); |
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
||||
text-align: left; |
||||
white-space: pre; |
||||
word-spacing: normal; |
||||
word-break: normal; |
||||
word-wrap: normal; |
||||
line-height: 1.5; |
||||
|
||||
-moz-tab-size: 4; |
||||
-o-tab-size: 4; |
||||
tab-size: 4; |
||||
|
||||
-webkit-hyphens: none; |
||||
-moz-hyphens: none; |
||||
-ms-hyphens: none; |
||||
hyphens: none; |
||||
} |
||||
|
||||
/* Code blocks */ |
||||
pre[class*="language-"] { |
||||
padding: 1em; |
||||
margin: 0; |
||||
overflow: auto; |
||||
border-radius: 0.3em; |
||||
} |
||||
|
||||
:not(pre) > code[class*="language-"], |
||||
pre[class*="language-"] { |
||||
background: #2E303A; |
||||
} |
||||
|
||||
/* Inline code */ |
||||
:not(pre) > code[class*="language-"] { |
||||
padding: .1em; |
||||
border-radius: .3em; |
||||
white-space: normal; |
||||
} |
||||
|
||||
.token.comment, |
||||
.token.prolog, |
||||
.token.doctype, |
||||
.token.cdata { |
||||
color: slategray; |
||||
} |
||||
|
||||
.token.punctuation { |
||||
color: #f8f8f2; |
||||
} |
||||
|
||||
.namespace { |
||||
opacity: .7; |
||||
} |
||||
|
||||
.token.property, |
||||
.token.tag, |
||||
.token.constant, |
||||
.token.symbol, |
||||
.token.deleted { |
||||
color: #f92672; |
||||
} |
||||
|
||||
.token.boolean, |
||||
.token.number { |
||||
color: #ae81ff; |
||||
} |
||||
|
||||
.token.selector, |
||||
.token.attr-name, |
||||
.token.string, |
||||
.token.char, |
||||
.token.builtin, |
||||
.token.inserted { |
||||
color: #a6e22e; |
||||
} |
||||
|
||||
.token.operator, |
||||
.token.entity, |
||||
.token.url, |
||||
.language-css .token.string, |
||||
.style .token.string, |
||||
.token.variable { |
||||
color: #f8f8f2; |
||||
} |
||||
|
||||
.token.atrule, |
||||
.token.attr-value, |
||||
.token.function, |
||||
.token.class-name { |
||||
color: #e6db74; |
||||
} |
||||
|
||||
.token.keyword { |
||||
color: #66d9ef; |
||||
} |
||||
|
||||
.token.regex, |
||||
.token.important { |
||||
color: #fd971f; |
||||
} |
||||
|
||||
.token.important, |
||||
.token.bold { |
||||
font-weight: bold; |
||||
} |
||||
.token.italic { |
||||
font-style: italic; |
||||
} |
||||
|
||||
.token.entity { |
||||
cursor: help; |
||||
} |
||||
|
||||
pre[class*="language-"].line-numbers { |
||||
position: relative; |
||||
padding-left: 3.8em; |
||||
counter-reset: linenumber; |
||||
} |
||||
|
||||
pre[class*="language-"].line-numbers > code { |
||||
position: relative; |
||||
white-space: inherit; |
||||
} |
||||
|
||||
.line-numbers .line-numbers-rows { |
||||
position: absolute; |
||||
pointer-events: none; |
||||
top: 0; |
||||
font-size: 100%; |
||||
left: -3.8em; |
||||
width: 3em; /* works for line-numbers below 1000 lines */ |
||||
letter-spacing: -1px; |
||||
|
||||
-webkit-user-select: none; |
||||
-moz-user-select: none; |
||||
-ms-user-select: none; |
||||
user-select: none; |
||||
|
||||
} |
||||
|
||||
.line-numbers-rows > span { |
||||
pointer-events: none; |
||||
display: block; |
||||
counter-increment: linenumber; |
||||
} |
||||
|
||||
.line-numbers-rows > span:before { |
||||
content: counter(linenumber); |
||||
color: #999; |
||||
display: block; |
||||
padding-right: 0.8em; |
||||
text-align: right; |
||||
} |
||||
|
||||
div.code-toolbar { |
||||
border-radius: 0.3em; |
||||
overflow: hidden; |
||||
position: relative; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar { |
||||
position: absolute; |
||||
top: 5px; |
||||
right: -2px; |
||||
transition: opacity 0.1s ease-in-out; |
||||
opacity: 0; |
||||
} |
||||
|
||||
div.code-toolbar:hover > .toolbar { |
||||
opacity: 1; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar .toolbar-item { |
||||
display: inline-block; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar a { |
||||
cursor: pointer; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar button { |
||||
background: none; |
||||
border: 0; |
||||
color: inherit; |
||||
font: inherit; |
||||
line-height: normal; |
||||
overflow: visible; |
||||
padding: 0; |
||||
-webkit-user-select: none; /* for button */ |
||||
-moz-user-select: none; |
||||
-ms-user-select: none; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar a, |
||||
div.code-toolbar > .toolbar button, |
||||
div.code-toolbar > .toolbar span { |
||||
color: #FFF; |
||||
font-size: .8em; |
||||
padding: 0 .5em; |
||||
background: #64C2A0; |
||||
padding: 1em; |
||||
border-top-right-radius: 0.4em; |
||||
border-bottom-left-radius: 0.5em; |
||||
} |
||||
|
||||
div.code-toolbar > .toolbar a:hover, |
||||
div.code-toolbar > .toolbar a:focus, |
||||
div.code-toolbar > .toolbar button:hover, |
||||
div.code-toolbar > .toolbar button:focus, |
||||
div.code-toolbar > .toolbar span:hover, |
||||
div.code-toolbar > .toolbar span:focus { |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.command-line-prompt { |
||||
border-right: 1px solid #999; |
||||
display: block; |
||||
float: left; |
||||
font-size: 100%; |
||||
letter-spacing: -1px; |
||||
margin-right: 1em; |
||||
pointer-events: none; |
||||
|
||||
-webkit-user-select: none; |
||||
-moz-user-select: none; |
||||
-ms-user-select: none; |
||||
user-select: none; |
||||
} |
||||
|
||||
.command-line-prompt > span:before { |
||||
color: #999; |
||||
content: ' '; |
||||
display: block; |
||||
padding-right: 0.8em; |
||||
} |
||||
|
||||
.command-line-prompt > span[data-user]:before { |
||||
content: "[" attr(data-user) "@" attr(data-host) "] $"; |
||||
} |
||||
|
||||
.command-line-prompt > span[data-user="root"]:before { |
||||
content: "[" attr(data-user) "@" attr(data-host) "] #"; |
||||
} |
||||
|
||||
.command-line-prompt > span[data-prompt]:before { |
||||
content: attr(data-prompt); |
||||
} |
||||
@ -0,0 +1,678 @@
|
||||
* { |
||||
-webkit-box-sizing: border-box; |
||||
-moz-box-sizing: border-box; |
||||
box-sizing: border-box; |
||||
} |
||||
html { |
||||
color: #2d303b; |
||||
} |
||||
html, p, nav, section, article, div { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
} |
||||
*:focus { |
||||
outline: 0; |
||||
} |
||||
pre { |
||||
padding: 0; |
||||
} |
||||
p { |
||||
color: #2d303b; |
||||
} |
||||
a { |
||||
-o-transition:.5s; |
||||
-ms-transition:.5s; |
||||
-moz-transition:.5s; |
||||
-webkit-transition:.5s; |
||||
transition:.5s; |
||||
color: #616161; |
||||
} |
||||
a:hover { |
||||
color:#35c49e; |
||||
} |
||||
a:hover, |
||||
a:focus { |
||||
text-decoration: underline; |
||||
} |
||||
a.pure-button:hover, a.pure-button:focus { |
||||
color: inherit; |
||||
text-decoration: none; |
||||
} |
||||
a.pure-button-primary:hover, a.pure-button-primary:focus { |
||||
color: #fff; |
||||
} |
||||
p a { |
||||
color:#35c49e; |
||||
} |
||||
h1 { |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 700; |
||||
} |
||||
.center { |
||||
text-align: center; |
||||
} |
||||
.red { |
||||
color: #35c49e; |
||||
} |
||||
.dark-red { |
||||
color: #35c49e; |
||||
} |
||||
.thin-line { |
||||
height: 1px; |
||||
border: 0px; |
||||
background: #eee; |
||||
} |
||||
|
||||
/* Layout */ |
||||
.pure-img-responsive { |
||||
max-width: 100%; |
||||
height: auto; |
||||
} |
||||
#layout { |
||||
padding: 0; |
||||
} |
||||
.header { |
||||
text-align: center; |
||||
top: auto; |
||||
margin: 3em auto; |
||||
} |
||||
.content { |
||||
padding: 2em 1em 0; |
||||
} |
||||
|
||||
/* Sidebar */ |
||||
h1.brand-title { |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 400; |
||||
padding-top: 1rem; |
||||
font-size: 3rem; |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
h2.brand-tagline { |
||||
font-size: 1.4rem; |
||||
margin-top: 0.25rem; |
||||
} |
||||
.sidebar h1.brand-title { |
||||
color: #fff; |
||||
} |
||||
.brand-tagline { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
font-weight: 200; |
||||
} |
||||
.sidebar { |
||||
background: #2d303b; |
||||
} |
||||
.sidebar, .sidebar p { |
||||
color: #8b8b8b; |
||||
} |
||||
.sidebar a { |
||||
color: #fff; |
||||
} |
||||
.sidebar a:hover { |
||||
color:#35c49e; |
||||
} |
||||
|
||||
/* Nav */ |
||||
.nav-list { |
||||
margin: 0; |
||||
padding: 0; |
||||
list-style: none; |
||||
padding-bottom: 1rem; |
||||
} |
||||
.nav-item { |
||||
display: inline-block; |
||||
*display: inline; |
||||
zoom: 1; |
||||
} |
||||
.nav-item a { |
||||
background: transparent; |
||||
color: #fff; |
||||
margin-top: 1rem; |
||||
letter-spacing: 0.05rem; |
||||
text-transform: uppercase; |
||||
font-size: 0.85rem; |
||||
text-decoration: none; |
||||
margin-right: 0.1rem; |
||||
line-height: 1.5rem; |
||||
} |
||||
.nav-item a:hover, |
||||
.nav-item a:focus { |
||||
text-decoration: none; |
||||
} |
||||
.nav-item-separator { |
||||
font-weight: 300; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #35c49e; |
||||
letter-spacing: -0.35rem; |
||||
margin-right: 0.4rem; |
||||
} |
||||
|
||||
/* Nav To Top */ |
||||
#nav-to-top { |
||||
display: none; |
||||
position: fixed; |
||||
right: 0; |
||||
top: 10px; |
||||
padding: 0.5rem 1.5rem 0.5rem 0.5rem; |
||||
font-size: 0.85rem; |
||||
background: #fff; |
||||
} |
||||
|
||||
/* Posts */ |
||||
h1.post-title a { |
||||
text-decoration: none; |
||||
color: #111111; |
||||
} |
||||
.post-date { |
||||
color: #35c49e; |
||||
font-family: 'Libre Baskerville', serif; |
||||
font-weight: 400; |
||||
font-size: 1.0rem; |
||||
} |
||||
.post-date-day { |
||||
font-size: 1.5rem; |
||||
margin-right: -0.2rem; |
||||
} |
||||
.post-date-separator { |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
font-weight: 300; |
||||
letter-spacing: -0.35rem; |
||||
font-size: 1.9rem; |
||||
color: #35c49e; |
||||
} |
||||
.post-date-month { |
||||
font-size: 0.8rem; |
||||
color: #35c49e; |
||||
} |
||||
.post-date-year { |
||||
font-size: 0.8rem; |
||||
color: #35c49e; |
||||
} |
||||
a.post-author { |
||||
font-size: 0.9rem; |
||||
text-decoration: underline; |
||||
} |
||||
.post-author-single { |
||||
font-size: 0.9rem; |
||||
} |
||||
.post-author-social a { |
||||
color: #bbb; |
||||
} |
||||
.post-author-social a:hover, .post-author-social a:focus { |
||||
color: #35c49e; |
||||
} |
||||
.post-author-social i { |
||||
font-size: 0.9rem; |
||||
} |
||||
.post { |
||||
padding-bottom: 1.8rem; |
||||
line-height: 1.75rem; |
||||
} |
||||
.post p { |
||||
margin-bottom: 1.75rem; |
||||
margin-top: 0; |
||||
} |
||||
.post h3 { |
||||
margin-bottom: .25rem; |
||||
font-size: 1.4rem; |
||||
color: #35c49e; |
||||
font-weight: 500; |
||||
} |
||||
.post h3.post-subtitle { |
||||
font-weight: 200; |
||||
color: #999; |
||||
} |
||||
.post table { |
||||
margin-bottom: 1.75rem; |
||||
margin-top: 0; |
||||
} |
||||
.post-title { |
||||
font-size: 2rem; |
||||
color: #222; |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
.post-subtitle { |
||||
font-size: 1.5rem; |
||||
margin: 0; |
||||
font-weight: 200; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #999; |
||||
} |
||||
.post-reading-time { |
||||
display: inline; |
||||
font-size: 0.65rem; |
||||
color: #aeaeae; |
||||
} |
||||
.post-avatar-wrapper { |
||||
width: 50px; |
||||
height: 50px; |
||||
border-radius: 50px; |
||||
overflow: hidden; |
||||
margin-left: 1rem; |
||||
float: right; |
||||
} |
||||
.post-avatar { |
||||
height: 50px; |
||||
} |
||||
.post-summary { |
||||
margin-top: 0.5rem; |
||||
} |
||||
.read-more-link { |
||||
float: right; |
||||
clear: left; |
||||
margin-top: 0.25rem; |
||||
} |
||||
.read-more-link a { |
||||
text-decoration: none; |
||||
/*text-transform: uppercase;*/ |
||||
font-weight: 400; |
||||
font-size: 0.9rem; |
||||
color: #35c49e; |
||||
} |
||||
.read-more-link a:hover, .read-more-link a:focus { |
||||
color: #35c49e; |
||||
} |
||||
.read-more-slashes { |
||||
font-weight: 100; |
||||
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; |
||||
color: #35c49e; |
||||
letter-spacing: -0.26rem; |
||||
margin-right: 0.3rem; |
||||
} |
||||
|
||||
.post-description { |
||||
color: #444; |
||||
line-height: 1.8rem; |
||||
} |
||||
.post-meta { |
||||
color: #2d303b; |
||||
font-size: 90%; |
||||
margin: 0; |
||||
} |
||||
p.post-meta { |
||||
margin-bottom: 0; |
||||
} |
||||
.post-meta a { |
||||
color: #616161; |
||||
} |
||||
.post-meta a:hover { |
||||
color: #35c49e; |
||||
} |
||||
.post-categories { |
||||
clear: left; |
||||
} |
||||
.post-category { |
||||
margin: 0 0.1rem; |
||||
padding: 0.2rem 0.5rem; |
||||
color: #fff; |
||||
background: #999; |
||||
font-size: 0.75rem; |
||||
} |
||||
a.post-category { |
||||
text-decoration: none; |
||||
} |
||||
a.post-category:hover { |
||||
color: #fff; |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
/* Banner Image */ |
||||
.content-banner-image { |
||||
overflow: hidden; |
||||
} |
||||
.content-banner-image-inline { |
||||
float: right; |
||||
margin: 0.5rem 0 1.5rem 2rem; |
||||
} |
||||
|
||||
/* Social Sharing */ |
||||
.social-sharing { |
||||
clear: left; |
||||
padding-left: 2px; |
||||
margin-top: 0.75rem; |
||||
margin-bottom: 0.75rem; |
||||
} |
||||
.social-sharing a { |
||||
padding: 0.4rem; |
||||
background: #ccc; |
||||
color: #fff; |
||||
text-align: center; |
||||
} |
||||
.social-sharing a i { |
||||
width: 16px; |
||||
} |
||||
.social-sharing a i span { |
||||
display: none; |
||||
} |
||||
.social-sharing a.share-button-twitter:hover { |
||||
background: #00aced; |
||||
} |
||||
.social-sharing a.share-button-facebook:hover { |
||||
background: #3b5998; |
||||
} |
||||
.social-sharing a.share-button-linkedin:hover { |
||||
background: #007bb6; |
||||
} |
||||
.social-sharing a.share-button-google-plus:hover { |
||||
background: #dd4b39; |
||||
} |
||||
.social-sharing a.share-button-pinterest:hover { |
||||
background: #cb2027; |
||||
} |
||||
.social-sharing a.share-button-vk:hover { |
||||
background: #45668e; |
||||
} |
||||
|
||||
/* Tags */ |
||||
.tags-list { |
||||
clear: left; |
||||
margin-bottom: 0.75rem; |
||||
font-size: 0.85rem; |
||||
color: #999; |
||||
} |
||||
|
||||
/* Decorative Marker */ |
||||
.decorative-marker { |
||||
color: #35c49e; |
||||
letter-spacing: -0.25rem; |
||||
margin-right: 0.4rem; |
||||
margin-lefT: 0.1rem; |
||||
} |
||||
|
||||
/* Paging */ |
||||
.paging { |
||||
margin-bottom: 0.75rem; |
||||
} |
||||
.paging, .paging-older, .paging-newer { |
||||
clear: left; |
||||
font-size: 0.85rem; |
||||
} |
||||
.paging-older, .paging-newer { |
||||
margin-bottom: 0.25rem; |
||||
} |
||||
.paging-label { |
||||
color: #999; |
||||
font-style: italic; |
||||
} |
||||
|
||||
/* ToC */ |
||||
#toc { |
||||
float: right; |
||||
padding: 0 1rem 1rem 1rem; |
||||
border-left: 1px solid #eee; |
||||
font-size: 0.9rem; |
||||
} |
||||
nav#TableOfContents li { |
||||
padding-bottom: 0.25rem; |
||||
} |
||||
nav#TableOfContents ul:first-child { |
||||
padding-left: 0px; |
||||
} |
||||
.toc-label { |
||||
font-size: 0.8rem; |
||||
color: #aeaeae; |
||||
} |
||||
|
||||
/* Footer */ |
||||
.footer { |
||||
text-align: center; |
||||
padding: 1rem 0; |
||||
font-weight: 100; |
||||
color: #aeaeae; |
||||
font-size: 0.7rem; |
||||
} |
||||
.footer a, .footer p { |
||||
color: #aeaeae; |
||||
} |
||||
.footer a { |
||||
text-decoration: none; |
||||
} |
||||
.footer a:hover { |
||||
color:#35c49e; |
||||
text-decoration: underline; |
||||
} |
||||
.footer .pure-menu a:hover, |
||||
.footer .pure-menu a:focus { |
||||
background: none; |
||||
} |
||||
ul.footer-menu { |
||||
list-style: none; |
||||
display: block; |
||||
text-align:center; |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
.footer-menu li { |
||||
display: inline-block; |
||||
margin-right: 0.5rem; |
||||
font-size: 0.8rem; |
||||
} |
||||
hr.thin { |
||||
height: 1px; |
||||
border: 0; |
||||
color: #eee; |
||||
background-color: #eee; |
||||
width: 90%; |
||||
} |
||||
|
||||
.search { |
||||
padding: 0.5em; |
||||
border: 0; |
||||
border-radius: 0.2em; |
||||
width: 100%; |
||||
} |
||||
|
||||
.result-items { |
||||
padding: 0; |
||||
} |
||||
|
||||
.result-items .post-date-day, |
||||
.result-items .post-date-separator, |
||||
.result-items .post-date-month, |
||||
.result-items .post-date-year { |
||||
color: white; |
||||
} |
||||
.result-item-left { |
||||
text-align: left; |
||||
} |
||||
.result-item-right { |
||||
text-align: right; |
||||
} |
||||
|
||||
.result-item { |
||||
list-style-type: none; |
||||
text-align: right; |
||||
padding: 0.6em 0; |
||||
/*border-bottom: 1px solid #8B8B8B;*/ |
||||
} |
||||
|
||||
.result-item a { |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.result-item:last-child { |
||||
border-bottom: none; |
||||
} |
||||
|
||||
.menu-item-depth-3 ul li.last a { |
||||
border-bottom: none; |
||||
} |
||||
|
||||
|
||||
.result-item > a { |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.result-item-separator, |
||||
.result-item-link { |
||||
transition: all .1s ease-out; |
||||
} |
||||
|
||||
.result-point { |
||||
position: absolute; |
||||
left: -50px; |
||||
transition: all .2s ease-out; |
||||
} |
||||
|
||||
.result-item-selected .result-item-link { |
||||
color: #35c49e; |
||||
} |
||||
|
||||
hr { |
||||
color: #35c49e; |
||||
background-color: #35c49e; |
||||
height: 1px; |
||||
} |
||||
|
||||
table { |
||||
border-collapse: collapse; |
||||
width: 100%; |
||||
} |
||||
table td, table th { |
||||
border: 0.1em solid #35c49e; |
||||
padding: 0.5em; |
||||
} |
||||
table tr:first-child th { |
||||
border-top: 0; |
||||
} |
||||
table tr:last-child td { |
||||
border-bottom: 0; |
||||
} |
||||
table tr td:first-child, |
||||
table tr th:first-child { |
||||
border-left: 0; |
||||
} |
||||
table tr td:last-child, |
||||
table tr th:last-child { |
||||
border-right: 0; |
||||
} |
||||
|
||||
.counters { |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
margin-bottom: 2em; |
||||
} |
||||
|
||||
.counters .counter { |
||||
text-decoration: none; |
||||
display: flex; |
||||
flex-direction: column; |
||||
flex: 33%; |
||||
text-align: center; |
||||
font-size: 4vw; |
||||
color: #FFF; |
||||
} |
||||
|
||||
.counters .counter .counter-sub { |
||||
text-align: center; |
||||
font-size: 1.2vw; |
||||
} |
||||
|
||||
h1 > a { |
||||
text-decoration: none; |
||||
|
||||
} |
||||
|
||||
h1 > a:hover { |
||||
text-decoration: none; |
||||
} |
||||
|
||||
@media (max-width: 1024px) { |
||||
.search-wrapper { |
||||
margin: 0 0em; |
||||
} |
||||
|
||||
/* .counters { |
||||
display: flex; |
||||
flex-direction: row; |
||||
margin-bottom: 2em; |
||||
} |
||||
|
||||
.counters .counter { |
||||
text-align: center; |
||||
text-decoration: none; |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex: 33%; |
||||
font-size: 3vw; |
||||
color: #FFF; |
||||
} |
||||
|
||||
.counters .counter .counter-sub { |
||||
text-align: center; |
||||
display: flex; |
||||
justify-content: left; |
||||
font-size: 3vw; |
||||
}*/ |
||||
|
||||
.result-item { |
||||
list-style-type: none; |
||||
text-align: right; |
||||
padding: 0.2em 0; |
||||
} |
||||
h1.brand-title { |
||||
font-size: 2.5rem; |
||||
} |
||||
h2.brand-tagline { |
||||
font-size: 1.2rem; |
||||
} |
||||
|
||||
.header>.sidebarphoto{ |
||||
width:160px; |
||||
height:160px; |
||||
border-radius: 50%; |
||||
-moz-border-radius: 50%; |
||||
-webkit-border-radius: 50%; |
||||
} |
||||
} |
||||
|
||||
@media (max-width: 764px) { |
||||
.search-wrapper { |
||||
margin: 0 2em; |
||||
} |
||||
|
||||
.counters .counter { |
||||
text-decoration: none; |
||||
display: flex; |
||||
flex-direction: column; |
||||
flex: 33%; |
||||
text-align: center; |
||||
font-size: 8vw; |
||||
color: #FFF; |
||||
} |
||||
|
||||
.counters .counter .counter-sub { |
||||
text-align: center; |
||||
font-size: 4vw; |
||||
} |
||||
} |
||||
|
||||
@media (min-width: 48rem) { |
||||
|
||||
.content { |
||||
padding: 2rem 3rem 0; |
||||
margin-left: 25%; |
||||
} |
||||
|
||||
.content-banner-image { |
||||
margin-left: 25%; |
||||
} |
||||
|
||||
.header { |
||||
margin: 30% 2rem 0; |
||||
text-align: right; |
||||
} |
||||
|
||||
.header>.sidebarphoto{ |
||||
width:160px; |
||||
height:160px; |
||||
border-radius: 50%; |
||||
-moz-border-radius: 50%; |
||||
-webkit-border-radius: 50%; |
||||
} |
||||
|
||||
.sidebar { |
||||
position: fixed; |
||||
top: 0; |
||||
bottom: 0; |
||||
} |
||||
} |
||||
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,18 @@
|
||||
/* |
||||
Ridiculously Responsive Social Sharing Buttons |
||||
Team: @dbox, @joshuatuscan |
||||
Site: http://www.kurtnoble.com/labs/rrssb
|
||||
Twitter: @therealkni |
||||
|
||||
___ ___ |
||||
/__/| /__/\ ___ |
||||
| |:| \ \:\ / /\ |
||||
| |:| \ \:\ / /:/ |
||||
__| |:| _____\__\:\ /__/::\ |
||||
/__/\_|:|____ /__/::::::::\ \__\/\:\__ |
||||
\ \:\/:::::/ \ \:\~~\~~\/ \ \:\/\ |
||||
\ \::/~~~~ \ \:\ ~~~ \__\::/ |
||||
\ \:\ \ \:\ /__/:/ |
||||
\ \:\ \ \:\ \__\/ |
||||
\__\/ \__\/ |
||||
*/(function(e,t,n){"use strict";var r=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=t("li",n).length,i=100/r;t("li",n).css("width",i+"%").attr("data-initwidth",i)})},i=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=parseFloat(t(n).width()),i=t("li",n).not(".small").first().width(),s=t("li.small",n).length;i>170&&s<1?t(n).addClass("large-format"):t(n).removeClass("large-format");r<200?t(n).removeClass("small-format").addClass("tiny-format"):t(n).removeClass("tiny-format")})},s=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=0,i=0,s,o,a=t("li.small",n).length;if(a===t("li",n).length){var f=a*42,l=parseFloat(t(n).width());s=t("li.small",n).first();o=parseFloat(t(s).attr("data-size"))+55;if(f+o<l){t(n).removeClass("small-format");t("li.small",n).first().removeClass("small");u()}}else{t("li",n).not(".small").each(function(e){var n=parseFloat(t(this).attr("data-size"))+55,s=parseFloat(t(this).width());r+=s;i+=n});var c=r-i;s=t("li.small",n).first();o=parseFloat(t(s).attr("data-size"))+55;if(o<c){t(s).removeClass("small");u()}}})},o=function(e){t(".rrssb-buttons").each(function(e){var n=t(this),r=t("li",n).nextAll(),i=r.length;t(t("li",n).get().reverse()).each(function(e,r){if(t(this).hasClass("small")===!1){var i=parseFloat(t(this).attr("data-size"))+55,o=parseFloat(t(this).width());if(i>o){var a=t("li",n).not(".small").last();t(a).addClass("small");u()}}--r||s()})});e===!0&&f(u)},u=function(){t(".rrssb-buttons").each(function(e){var n=t(this),i,s,o,u,a,f=t("li.small",n).length;if(f>0&&f!==t("li",n).length){t(n).removeClass("small-format");t("li.small",n).css("width","42px");o=f*42;i=t("li",n).not(".small").length;s=100/i;a=o/i;navigator.userAgent.indexOf("Chrome")>=0||navigator.userAgent.indexOf("Safari")>=0?u="-webkit-calc("+s+"% - "+a+"px)":navigator.userAgent.indexOf("Firefox")>=0?u="-moz-calc("+s+"% - "+a+"px)":u="calc("+s+"% - "+a+"px)";t("li",n).not(".small").css("width",u)}else if(f===t("li",n).length){t(n).addClass("small-format");r()}else{t(n).removeClass("small-format");r()}});i()},a=function(){t(".rrssb-buttons").each(function(e){t(this).addClass("rrssb-"+(e+1))});r();t(".rrssb-buttons li .text").each(function(e){var n=parseFloat(t(this).width());t(this).closest("li").attr("data-size",n)});o(!0)},f=function(e){t(".rrssb-buttons li.small").removeClass("small");o();e()},l=function(t,r,i,s){var o=e.screenLeft!==n?e.screenLeft:screen.left,u=e.screenTop!==n?e.screenTop:screen.top,a=e.innerWidth?e.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,f=e.innerHeight?e.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,l=a/2-i/2+o,c=f/3-s/3+u,h=e.open(t,r,"scrollbars=yes, width="+i+", height="+s+", top="+c+", left="+l);e.focus&&h.focus()},c=function(){var e={};return function(t,n,r){r||(r="Don't call this twice without a uniqueId");e[r]&&clearTimeout(e[r]);e[r]=setTimeout(t,n)}}();t(".rrssb-buttons a.popup").on("click",function(e){var n=t(this);l(n.attr("href"),n.find(".text").html(),580,470);e.preventDefault()});t(e).resize(function(){f(u);c(function(){f(u)},200,"finished resizing")});t(document).ready(function(){a()})})(window,jQuery); |
||||
|
After Width: | Height: | Size: 570 B |
@ -0,0 +1,13 @@
|
||||
name = "Red Lounge" |
||||
description = "A clean, responsive, template with red accents." |
||||
license = "Apache 2.0" |
||||
licenselink = "https://github.com/tmaiaroto/hugo-redlounge/blob/master/LICENSE.md" |
||||
source_repo = "https://github.com/tmaiaroto/hugo-redlounge" |
||||
homepage = "https://github.com/tmaiaroto/hugo-redlounge" |
||||
tags = ["redlounge", "red", "raleway", "libre baskerville", "blog", "gallery"] |
||||
features = ["blog", "gallery"] |
||||
min_version = 0.14 |
||||
|
||||
[author] |
||||
name = "Tom Maiaroto" |
||||
homepage = "http://www.shift8creative.com" |
||||