Skip to content

Instantly share code, notes, and snippets.

View zourite's full-sized avatar
🤓
Working on Shifumi Game #JS/HTML/CSS

Sonia SAUGRIN zourite

🤓
Working on Shifumi Game #JS/HTML/CSS
View GitHub Profile
module.exports = {
/*
|--------------------------------------------------------------------------
| Files to watch
|--------------------------------------------------------------------------
| https://github.com/shakyShane/browser-sync/wiki/options#wiki-files
*/
files: ['**/*.php', '**/*.css', '**/*.js', '**/*.css'],
@zourite
zourite / hugo-dev
Created July 24, 2020 15:24
Deploy external server for hugo
#!/bin/zsh
VAR=$(/sbin/ip -o -4 addr list eno1 | awk '{print $4}' | cut -d/ -f1)
hugo server --bind 0.0.0.0 --baseURL http://$VAR:1313

Host staticman v2 API on heroku

  • Creat a new github account which will be added as collaborator to the project using staticman.
  • Go to settings -> developer settings -> personal access tokens. Create a token with admin:repo_hook permission.
  • Save the token.

  • Create a new app on heroku
  • Setup ENV variables
@zourite
zourite / header.html
Last active April 11, 2020 20:37
French Date for Hugo
<time class="published" datetime="{{ .Date }}">
<!-- {{ default (i18n "date_format") | .Date.Format }} -->
{{ .Date.Day }} {{ index $.Site.Data.months $.Site.Language.Lang (printf "%d" .Date.Month) }} {{ .Date.Year }}
</time>
{{ $paginator := .Paginator }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<ul class="pagination center">
<!-- Previous page. -->
{{ if $paginator.HasPrev }}
<li>

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@zourite
zourite / dploy.yaml
Created May 10, 2019 21:35
DPLOY - Examples
dev:
scheme : sftp
host: #IP ADRESS
branch : master
user: ""
pass: ""
exclude: ["dploy.yaml", "package.json","composer.json","composer.lock",".gitignore"]
path:
remote: "/home/www/"
prod:
<?php
/**
* PHPMailer simple contact form example.
* If you want to accept and send uploads in your form, look at the send_file_upload example.
*/
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
require 'vendor/autoload.php';
if (array_key_exists('to', $_POST)) {
$err = false;
@zourite
zourite / docker.yml
Created March 20, 2019 05:07
Docker files pour WordPress
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@zourite
zourite / reunion_districts.json
Created March 12, 2018 21:33 — forked from michelt/reunion_districts.json
Villes, quartiers et codes postaux de la Réunion
[
{
"name": "Les Avirons",
"postcode" : "97425",
"city" : "Les Avirons"
},
{
"name": "Bagatelle",
"postcode" : "97441",
"city" : "Sainte-Suzanne"