Skip to content

Instantly share code, notes, and snippets.

View jfretin's full-sized avatar

Jonathan Fretin jfretin

  • Royal Distribution
  • France
View GitHub Profile
@caugner
caugner / nightly-updater
Last active February 7, 2017 08:19
A simple updater for Mozilla Firefox Nightly in Linux multi-user environments.
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# A simple updater for Mozilla Firefox Nightly in Linux multi-user environments.
#
# Choose your OS, architecture and destination here:
NIGHTLY_OS='linux'
@jgrossi
jgrossi / Car.php
Last active March 19, 2024 11:05
How to use Eloquent (from Laravel) inside Wordpress
<?php // File location: /wp-content/themes/my-theme/src/Models/
namespace App\Models;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Car extends Eloquent
{
protected $table = 'cars';
protected $primaryId = 'id';
@hugochinchilla
hugochinchilla / slack_munin.sh
Last active July 7, 2023 14:53 — forked from anarchivist/slack_munin.sh
Slack notification script for Munin
#!/bin/bash
# Slack notification script for Munin
# Mark Matienzo (@anarchivist)
#
# To use:
# 1) Create a new incoming webhook for Slack
# 2) Edit the configuration variables that start with "SLACK_" below
# 3) Add the following to your munin configuration:
#
@oscarmorrison
oscarmorrison / IFTTTDate.md
Last active December 3, 2023 21:44
Make IFTTT Date Format play nice with Google Spreadsheets

##Date and Time

=TIMEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " ")) + DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))

##Date

=DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))

##Time

@Nihisil
Nihisil / jail.local
Last active September 5, 2023 06:20
Send notifications to the Slack from fail2ban
...
action_with_slack_notification = %(banaction)s[name=%(__name__)s, port="%(port)$
slack[name=%(__name__)s]
action = %(action_with_slack_notification)s
...
@beevelop
beevelop / dompdf-pagebreak.html
Created April 18, 2015 07:48
explicit page break with dompdf
<div style="page-break-after: always;"></div>
@stakahashi
stakahashi / Vue.config
Last active August 29, 2015 14:17
Laravel(blade template)でvue.jsのmustache記法を使用する ref: http://qiita.com/shunsuke-takahashi/items/8f697d1bbf6ba3902ca2
{
// print stack trace for warnings?
debug: true,
// attribute prefix for directives
prefix: 'v-',
// interpolation delimiters
// for HTML interpolations, add
// 1 extra outer-most character.
delimiters: ['{{', '}}'],
// suppress warnings?
@maxauvy
maxauvy / MakeOpenVPN.sh
Last active October 13, 2017 11:43
MakeOpenVPN.sh
#!/bin/bash
# Déclaration des variables par défaut
DEFAULT="Default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".3des.key"
CA="ca.crt"
TA="ta.key"
@tsolar
tsolar / laravel-subdirectory.conf
Last active February 27, 2024 03:36
Laravel in subdirectory nginx example
server {
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 300M;
sendfile on;
send_timeout 300s;
# Port that the web server will listen on.
#listen 80;
@BFTrick
BFTrick / create-custom-setting.php
Created July 29, 2014 17:38
Generate a custom button within the Integration tab.
/**
* Initialize integration settings form fields.
*
* @return void
*/
public function init_form_fields() {
$this->form_fields = array(
// don't forget to put your other settings here
'customize_button' => array(