Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Vincent Loy VincentLoy

🏠
Working from home
Block or report user

Report or block VincentLoy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@VincentLoy
VincentLoy / createwp.sh
Created May 28, 2019
create new wordpress project, ready to use | FOR DEV ONLY !! DO NOT USE IN PRODUCTION !! :D :D
View createwp.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "You must run this script as SUDO"
exit 0
fi
if [ -d ./$1 ]
then
echo ">>> Folder Already exists"
@VincentLoy
VincentLoy / error.txt
Last active May 28, 2019
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
View error.txt
Err:19 https://packages.sury.org/php stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Ign:26 http://ftp.au.debian.org/debian stretch InRelease
Hit:27 http://ftp.au.debian.org/debian stretch Release
Fetched 456 kB in 2s (189 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Some index files failed to download. They have been ignored, or old ones used instead.
@VincentLoy
VincentLoy / yacp-custom-template.css
Created Apr 29, 2019
YACP Custom Countdown Theme CSS Example
View yacp-custom-template.css
/*
* Project : simply-countdown
* File : simplyCountdown.theme.custom
* Author : Your Name <your-mail[at]example.com>
*/
.simply-countdown-custom {
/* The countdown */
}
.simply-countdown-custom > .simply-section {
View shit_updraftsqldump_fix.sh
# Fix bad default values
sed -i -e "s/0000-00-00 00:00:00/2018-01-01 00:00:00/g" file.sql
sed -i -e "s/OLD_DB_PREFIX/NEW_DB_PREFIX/g" file.sql # if needed
# Update mysql configuration because of dirty DB (/etc/mysql/mysql.conf.d/mysql.cnf in Ubuntu server
[mysqld]
innodb_log_file_size = 512M
innodb_strict_mode = 0
# then drop the original DB if needed, and created it once again
@VincentLoy
VincentLoy / breadcrumb.jinja
Last active Dec 7, 2018
Easy snippet to get breadcrumb in a Wagtail page
View breadcrumb.jinja
<div class="breadcrumb-content">
{% if self.get_ancestors|length > 1 %}
<ul class="breadcrumb">
{% for p in self.get_ancestors %}
{% if p.is_root == False %}
<li><a href="{{ p.url }}">{{ p.title }}</a></li>
{% endif %}
{% endfor %}
<li class="active">{{ self.title }}</li>
@VincentLoy
VincentLoy / example_1.twig
Created Nov 20, 2018
ACF File Field + Timber Twig
View example_1.twig
{% set file = TimberImage(post.download_kit) %}
<a href="{{ file.src }}" target="_blank">Download Stuff Bro</a>
@VincentLoy
VincentLoy / post.html
Created Nov 15, 2018
Wordpress Post Basic styles Test Post
View post.html
<h1>Level 1 title</h1>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus varius, ex at dictum cursus, metus tellus imperdiet erat, nec feugiat est dolor at lorem. Curabitur augue odio, <strong>aliquam non congue id</strong>, egestas id ex. Integer dui turpis, venenatis a ipsum non, fermentum pretium elit. Morbi magna diam, consectetur dapibus ex a, luctus lobortis purus. <strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. <a href="https://vincent-loy.fr">Cras eget mi fermentum risus porttitor molestie</a> a eget quam. In malesuada metus dolor, vehicula fringilla sapien semper in. Vivamus ut molestie eros, et sodales est. Fusce leo ante.
<h2>Level 2 title</h2>
Placerat sit amet vehicula eget, accumsan eget lacus. Nunc ut mi fringilla, laoreet eros vitae, <a href="https://vincent-loy.fr">accumsan</a> sem. Aliquam fermentum lorem ut sapien pharetra fermentum (<em>Praesent a dui sed quam luctus vulputate at non erat</em>) Nullam laoreet dui
View bootstrap-contact-form-7-scss-alert-snippet.scss
div.wpcf7-response-output {
@extend .alert;
}
div.wpcf7-mail-sent-ok {
@extend .alert-success;
}
div.wpcf7-mail-sent-ng,
div.wpcf7-aborted {
@VincentLoy
VincentLoy / metutils.py
Created May 12, 2015
some weather utilities functions
View metutils.py
#!/usr/bin/env python
"""
Tropical Cyclone Risk Model (TCRM) - Version 1.0 (beta release)
Copyright (C) 2011 Geoscience Australia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@VincentLoy
VincentLoy / index.html
Last active Mar 15, 2018
scanit example html
View index.html
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>scanit.js</title>
<!-- JUST ADD SOME STYLES FOR YOU QR CODE ELEMENT (Basically, a square) -->
<style>
.qrContainer {
width: 450px;
height: 450px;
You can’t perform that action at this time.