Skip to content

Instantly share code, notes, and snippets.

View elshahat's full-sized avatar
🎯
Working on my targets!

Ahmed ElShahat elshahat

🎯
Working on my targets!
View GitHub Profile
@elshahat
elshahat / demoVideos.js
Last active March 22, 2023 18:52 — forked from jsturgis/gist:3b19447b304616f18657
Public demo videos
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@elshahat
elshahat / CryptoJS-DES.html
Created January 14, 2019 22:52 — forked from ufologist/CryptoJS-DES.html
Use CryptoJS encrypt message by DES and direct decrypt ciphertext, compatible with Java Cipher.getInstance("DES")
<!-- test pass with CryptoJS v3.1.2 -->
<script src="rollups/tripledes.js"></script>
<script src="components/mode-ecb.js"></script>
<script>
/**
* Encrypt message by DES in ECB mode and Pkcs7 padding scheme
*
* NOTE: DES is weak, please use 3DES(Triple DES) or AES
*
* @param {String} message
@elshahat
elshahat / gist:8c71c390074daefb986d8c1940355ab8
Created April 7, 2019 21:01 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
const { src, dest, watch, series, parallel } = require('gulp'),
server = require('browser-sync').create(),
sass = require('gulp-sass'),
sassLint = require('gulp-sass-lint'),
autoPrefixer = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
plumber = require('gulp-plumber'),
uglify = require('gulp-uglify'),
kit = require('gulp-kit'),
notify = require('gulp-notify'),
Verifying my Blockstack ID is secured with the address 1P1yP3wsQDGPaoMgMbFhe5oEu4DNmBtP54 https://explorer.blockstack.org/address/1P1yP3wsQDGPaoMgMbFhe5oEu4DNmBtP54
function new_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
“type” => “warning”
), $atts));
return '<div class="alert alert-'.$type.'">'.$content.'</div>';
}
add_shortcode(“warning_box”, “new_shortcode”);
<?php
function perform_database_action(){
mysql_query(“INSERT into table_name (col1, col2, col3) VALUES ('$value1','$value2', '$value3');
}
wp_enqueue_script('custom-script', '/js/functions.js');
add_action('admin_menu', 'custom_menu');
function custom_menu(){
add_menu_page('Custom Menu', 'Custom Menu', 'manage_options', 'custom-menu-slug', 'custom_menu_page_display');
}
function custom_menu_page_display(){
echo '<h1>Hello World</h1>';
echo '<p>This is a custom page</p>';
}