Skip to content

Instantly share code, notes, and snippets.

@gregory-yet
gregory-yet / TimeSheet.css
Last active October 17, 2018 15:10
Planification autorisé / bloqué (ex. contrôle parental freebox)
tbody.TimeSheet{
-webkit-user-select:none;
-moz-user-select : none;
user-select : none;
border : #cccccc 1px solid;
color : #757a7d;
font-size: 12px;
cursor:default;
border-collapse: collapse;
}
@gregory-yet
gregory-yet / admin.js
Created February 15, 2018 15:00
SweetAlert Confirmation with Ajax
$(document).ready(function(){
$('a#delete').on('click', function(){
var $id = $(this).data('id');
swal({
title: 'Êtes-vous sur ?',
text: "Cette action est irréversible.",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#d33',
cancelButtonColor: '#3085d6',
@gregory-yet
gregory-yet / modifier.slugify.php
Created November 10, 2017 08:39
Include this file in SMARTY_DIR/libs/plugins with this name : modifier.slugify.php
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Generate a slug
@gregory-yet
gregory-yet / image.html
Created October 12, 2017 07:46
Preview an image in a tooltip with a file input w/ bootstrap, popper.js
<html>
<head>
<title>Image in tooltip</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
<style>
#medias input[type="file"] {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
@gregory-yet
gregory-yet / index.js
Created January 6, 2017 11:26
Send message with Gammu and Node.js
// replace /etc/gammu-smsdrc with your config file
// replace 06xxxxxxxx with your phone number
// replace Bip bip with your message
var spawn = require('child_process').spawn;
var retour = [];
var gammu = spawn(`gammu`, [`-c`, '/etc/gammu-smsdrc', `sendsms`, 'TEXT', '06xxxxxxxx', '-text', 'Bip bip']);
gammu.stdout.on('data', function(data){
retour.push(data.toString('ascii'));
C:\Users\Grégory\Desktop\Ionic\build>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Grégory\Desktop\Ion
ic\build\hooks\after_prepare\010_add_platform_class.js C:\Users\Grégory\Desktop\
Ionic\build
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Grégory\Desktop\Ionic\build\platforms\andr
oid\cordova\build.bat""
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
Running: C:\Users\Grégory\Desktop\Ionic\build\platforms\android\gradlew cdvBuild