I hereby claim:
- I am brunoamaral on github.
- I am brunoamaral (https://keybase.io/brunoamaral) on keybase.
- I have a public key ASBZ1sWZZKDDtvfTrFyfb5P4wPeI8QduJScRUDSkGM_raAo
To claim this, I am signing this object:
| <!-- | |
| I use a lot of photos from unsplash as headers. This shortcode works in two ways to make that easier: | |
| 1. Standard use | |
| {{< copyright name="Malte Wingen" href="https://unsplash.com/@maltewingen?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText" >}} | |
| 2. Automatic parsing of filename | |
| {{< copyright >}} |
| /**/ | |
| /* GALLERY */ | |
| /**/ | |
| .gallery{ | |
| width: 100%; | |
| display: block; | |
| margin:0 auto; | |
| } |
| @DeLorean:~/Digital-Insanity$ hugo --cleanDestinationDir | |
| Building sites … fatal error: runtime: out of memory | |
| runtime stack: | |
| runtime.throw(0x12202bd, 0x16) | |
| /usr/local/go/src/runtime/panic.go:617 +0x72 | |
| runtime.sysMap(0xc04c000000, 0x4000000, 0x1eb5cd8) | |
| /usr/local/go/src/runtime/mem_linux.go:170 +0xc7 | |
| runtime.(*mheap).sysAlloc(0x1e8ef80, 0x484000, 0x1e8ef90, 0x242) | |
| /usr/local/go/src/runtime/malloc.go:633 +0x1cd |
| server { | |
| server_name .DOMAIN-NAME; | |
| listen 80; | |
| # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. | |
| return 301 https://$host$request_uri; | |
| } | |
| server { | |
| listen 443 ssl http2; | |
| gzip on; |
| #!/bin/bash | |
| INCLUDE="/etc/nginx/incl/basicauth.conf" | |
| SOURCEDIR="/home/Digital-Insanity/content/" | |
| read -p "Website nginx directory without trailling slash [/var/web/brunoamaral.eu]:" publicDir | |
| publicDir=${publicDir:-/var/web/brunoamaral.eu} | |
| read -p "Which directory should we protect? (no trailling slash)" relUrl | |
| htpasswd -c "$publicDir$relUrl/.htpasswd" nginx; | |
| cp "$publicDir$relUrl/.htpasswd" "$SOURCEDIR$relUrl" |
| for file in * | |
| do | |
| date=`cut -d' ' -f 1 <<< "$file"` | |
| dir=${file%".jpg"} | |
| mkdir "$dir" | |
| mv "$file" "$dir" | |
| time=`cut -d' ' -f 2 <<< "$file" | sed -e 's/\./\:/g'` | |
| datetime=$date'T'$time'+00:00' | |
| printf '%s\n' '---' 'categories: ["instagram"]' "date: $datetime" 'description: ""' 'draft: false' 'resources:' " - src: '$file'" ' name: "header"' 'layout: instagram' 'slug:' 'stories:' 'subtitle:' 'title: Untitled' 'options:' ' unlisted: false' ' showHeader: true' '---' '' "<img src=\"$file\" />" | tee $dir/index.md $dir/index.pt.md | |
| done |
| const webpack = require('webpack'); | |
| const path = require('path'); | |
| const config = { | |
| entry: ['./src/index.js', './src/scss/main.scss'], | |
| output: { | |
| filename: 'main.js', | |
| path: path.resolve(__dirname, 'static') | |
| }, | |
| watch: true, |
| #!/bin/zsh | |
| # Version 2.0 | |
| # Works pretty much the same as the initial version. If you have a folder in Documents/Archive/ with a project name, | |
| # it can be used to organize your files. | |
| # EXAMPLE | |
| # Given the folder Desktop/Freelance client-X, and if you have a folder called Documents/Archive/Freelance, content will be moved to | |
| # Documents/Archive/Freelance/client-X/2019-01-30/ | |
| # The first word of the folder in desktop must match the one in the Archive. |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| function facebooklog(){ | |
| require('/PATH_TO_FACEBOOK_PHP_SDK/src/facebook.php'); | |
| $facebook = new Facebook(array( | |
| 'appId' => 'YOUR_APP_ID', | |
| 'secret' => 'YOUR_APP_SECRET', | |
| )); | |
| // Get User ID | |
| $user = $facebook->getUser(); |