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 / TeamViewer-15-id-changer-for-mac.py
Created March 26, 2023 09:35 — forked from STiXzoOR/TeamViewer-15-id-changer-for-mac.py
Teamviewer 15 ID Changer for macOS (Python 3)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# System: macOS 12+
# Version: TeamViewer v15.x.x
# Python: 3.x.x
# Command: sudo python TeamViewer-15-id-changer.py
#
import os
@elshahat
elshahat / FileInput.tsx
Created October 31, 2020 21:56 — forked from reecelucas/FileInput.tsx
Custom React file select component
import * as React from 'react';
interface Props extends React.HTMLProps<HTMLInputElement> {
onFileSelect: (file: File) => void;
}
const FileInput = ({ onFileSelect, ...props }: Props) => {
const inputRef = React.useRef<HTMLInputElement>();
const onChange = (event: React.ChangeEvent) => {
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>';
}
wp_enqueue_script('custom-script', '/js/functions.js');
<?php
function perform_database_action(){
mysql_query(“INSERT into table_name (col1, col2, col3) VALUES ('$value1','$value2', '$value3');
}
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”);
Verifying my Blockstack ID is secured with the address 1P1yP3wsQDGPaoMgMbFhe5oEu4DNmBtP54 https://explorer.blockstack.org/address/1P1yP3wsQDGPaoMgMbFhe5oEu4DNmBtP54
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'),
@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 */
}