Skip to content

Instantly share code, notes, and snippets.

View Xsmael's full-sized avatar
😎
Be serious, but not too serious

Ismael O. Xsmael

😎
Be serious, but not too serious
  • SharpEdge
  • 127.0.0.1
View GitHub Profile
@Xsmael
Xsmael / .htaccess
Created January 13, 2023 09:24 — forked from seoagentur-hamburg/.htaccess
UPDATE 2022/10: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.6 - 10/2022
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@Xsmael
Xsmael / gist:c35cfb9d559027a8b29f12d1a9365548
Created February 7, 2022 17:34 — forked from willyaranda/gist:11376151
List of MCC-MNC, Countries, Prefixes and telco
289 88 ab Abkhazia 7 A-Mobile
289 68 ab Abkhazia 7 A-Mobile
289 67 ab Abkhazia 7 Aquafon
412 88 af Afghanistan 93 Afghan Telecom Corp. (AT)
412 80 af Afghanistan 93 Afghan Telecom Corp. (AT)
412 01 af Afghanistan 93 Afghan Wireless/AWCC
412 40 af Afghanistan 93 Areeba
412 50 af Afghanistan 93 Etisalat
412 20 af Afghanistan 93 Roshan
276 01 al Albania 355 AMC Mobil
@Xsmael
Xsmael / lara-git.md
Last active November 1, 2021 16:27
Laravel & Git help file

Merging another developer's branch into mine


Let's say you are currently working on branch feature/feature_a and you want to merge the changes made in another branch called feature/feature_b to feature/feature_a. The following commands should do the trick:

git checkout feature/feature_b

git pull

git checkout feature/feature_a

@Xsmael
Xsmael / example
Created May 14, 2020 09:47
upload / load excel file in browser using angularjs and ng-file-upload
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/danialfarid-angular-file-upload/12.2.13/ng-file-upload.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.13.5/xlsx.full.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.13.5/jszip.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', ['ngFileUpload'])
app.controller('MyController', function ($scope, $window) {
$scope.SelectFile = function (file) {
$scope.SelectedFile = file;
};
@Xsmael
Xsmael / woocommerce plugin
Last active April 23, 2020 15:47
woocommerce plugin
<?php
defined('ABSPATH') or exit;
// Make sure WooCommerce is active
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
return;
}
add_filter('woocommerce_payment_gateways', 'mobipay_add_gateway');
function mobipay_add_gateway($gateways)
@Xsmael
Xsmael / faye-client.js
Created November 4, 2019 14:40
faye client for browsers
var Faye=function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var i=n(1),s=n(2),r={VERSION:i.VERSION,Client:n(4),Scheduler:n(32)};s.wrapper=r,t.exports=r},function(t){t.exports={VERSION:"1.2.4",BAYEUX_VERSION:"1.0",ID_LENGTH:160,JSONP_CALLBACK:"jsonpcallback",CONNECTION_TYPES:["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],MANDATORY_CONNECTION_TYPES:["long-polling","callback-polling","in-process"]}},function(t,e,n){"use strict";var i=n(3),s={LOG_LEVELS:{fatal:4,error:3,warn:2,info:1,debug:0},writeLog:function(t,e){var n=s.logger||(s.wrapper||s).logger;if(n){var r=Array.prototype.slice.apply(t),o="[Faye",c=this.className,a=r.shift().replace(/\?/g,function(){try{return i(r.shift())}catch(t){return"[Object]"}});c&&(o+="."+c),o+="] ","function"==typeof n[e]?n[e](o+a):"function"==typeof n
@Xsmael
Xsmael / app.js
Last active November 4, 2019 12:03
angular-faye tutorial example
var app = angular.module('myapp', ['faye'])
app.factory('FayeFactory', function ($faye, $location) {
return $faye("http://localhost:8888/" );
});
app.controller("testController", function ($scope, FayeFactory) {
// CONNECTIVITY MONITORING:
FayeFactory.client.on('transport:down', function () {
@Xsmael
Xsmael / gist:543c74773f569533af202196dd716d04
Last active October 25, 2019 17:58 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@Xsmael
Xsmael / API-response.js
Last active June 7, 2019 14:16
API response format
{
"msg": String,
"errorCode": Number,
"success": bool
}
// exemple echec
{
"msg": "Echec validation paiement",
@Xsmael
Xsmael / villes-burkina-json.json
Created February 28, 2019 14:18
Liste villes du Burkina Faso en format JSON
[
"Koudougou",
"Banfora",
"Ouahigouya",
"Dédougou",
"Pissila",
"Kaya",
"Tanghin-Dassouri",
"Tenkodogo",
"Pouytenga",