Skip to content

Instantly share code, notes, and snippets.

View manutheblacker's full-sized avatar
🎯
Focusing

Emmanuel A. manutheblacker

🎯
Focusing
View GitHub Profile
/**
this filter take in parameter data who is an object build like this :
data = {
api_choosed : your_sms_gateway_name,
first_api_key : your_first_sms_gateway_api_key,
second_api_key : your_second_sms_gateway_api_key
}; **/
wp.hooks.addFilter( 'woo_usn_save_gateways_data', data );
@manutheblacker
manutheblacker / models.py
Created June 21, 2021 20:17 — forked from mpcabd/models.py
Archived models in Django 1.4.x
from django.db import models
class MyModelBase(models.Model):
class Meta:
abstract = True
field1 = models.CharField(max_length=256)
field2 = models.BooleanField(db_index=True, default=True)
#....
<html>
<head>
<title>HERE & Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<style>
body, html { border: 0; padding: 0; margin: 0; }
#map { width: 100vw; height: 100vh; }
</style>
</head>
@manutheblacker
manutheblacker / filter-wc-orders-by-gateway.php
Created October 22, 2020 13:53 — forked from bekarice/filter-wc-orders-by-gateway.php
Filters WooCommerce Orders by Payment Gateway Used
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*
@manutheblacker
manutheblacker / pj-8.cpp
Created October 4, 2020 06:47
Projet 8 cpp ecole
#include <iostream>
using namespace std;
class Rectangle {
private:
double longueur;
double largeur;
double perimetre;
@manutheblacker
manutheblacker / index.html
Created June 13, 2020 07:25
My Select2 Example // source https://jsbin.com/tozakar
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>My Select2 Example</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
</head>
@manutheblacker
manutheblacker / gist:11a493c7a8a7b3652b9319c55a18ce3e
Last active May 11, 2021 08:45 — forked from pwlin/gist:4147863
Translate any webpage using Google Translate
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
@manutheblacker
manutheblacker / index.html
Created June 5, 2020 06:53
JS Bin [add your bin description] // source https://jsbin.com/larelopedo
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@manutheblacker
manutheblacker / code.php
Created May 27, 2020 11:44
code de generation de code
<?php
function passgen2($nbChar){
return substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCEFGHIJKLMNOPQRSTUVWXYZ0123456789'),1, $nbChar);
}
function generate_code_ticket($ticket_number=1){
$ticket_disponible = array();
while($ticket_number > 0){
$ticket_code = passgen2(9);