Skip to content

Instantly share code, notes, and snippets.

View manutheblacker's full-sized avatar
🎯
Focusing

Emmanuel A. manutheblacker

🎯
Focusing
View GitHub Profile
@manutheblacker
manutheblacker / embed gist.md
Created July 7, 2021 07:04 — forked from Albert-W/embed gist.md
embed gist in iframe

Embed gist in iframe

it is used to embed gist to an asynchronously-loaded web pages.

<iframe 
    width="100%"
    height="350"    
    src="data:text/html;charset=utf-8,
 
<?php
//this hook take 3 parameters
// api_used : the api name selected into the SMS Gateway screen
// phone_number : the phone number who will receive the message
// message_to_send : the message that will be sent to the phone number
// you must return 200 if the delivery is successfully or 40X if it fails
add_filter('woo_usn_send_sms_to_customer', api_used, phone_number, message_to_send);
<?php
// api_choosed : the name of the sms gateway that will be saved
// data : the list of data that you have edited with the JS filter (woo_usn_save_gateways_data)
add_action('woo_usn_save_sms_gateway_credentials', api_choosed, data );
/**
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/leaflet@1.4.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.4.0/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>