Skip to content

Instantly share code, notes, and snippets.

View borma425's full-sized avatar
🎯
Focusing

Yehia Elborma borma425

🎯
Focusing
View GitHub Profile
@yidas
yidas / deep-link_app_examples.md
Last active November 24, 2023 23:21
Mobile App Deep Link Table (URL Scheme | App link | Universal link)
[
{
name:'arun',
gender:'Male',
physics:88,
maths:87,
english:78
},
{
name:'rajesh',
@john-doherty
john-doherty / javascript-clean-csv-string.js
Last active March 28, 2024 01:31
Remove empty values, trim whitespace and removes duplicate from a comma separated string in JavaScript
/**
* Removes empty values, trims whitespace and removes duplicate from a comma separated string in JavaScript
* @example
* cleanCsvString('one, ,, , two,two,two, three'); // returns 'one,two,three'
* cleanCsvString('one, ,, , two,two,two, three', false); // returns 'one,two,two,two,three'
* @param {string} str - string to modify
* @param {boolean} removeDuplicates - should remove duplicate items? (default = true)
* @returns {string} cleaned CSV string
*/
function cleanCsvString(str, removeDuplicates) {
@ajskelton
ajskelton / WP Customizer - Number
Last active May 28, 2022 14:13
Add a Number field to the WordPress Customizer.
$wp_customize->add_setting( 'themeslug_number_setting_id', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'themeslug_sanitize_number_absint',
'default' => 1,
) );
$wp_customize->add_control( 'themeslug_number_setting_id', array(
'type' => 'number',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Number' ),
@steve228uk
steve228uk / example.html
Last active February 4, 2024 13:14
Deeplink Youtube
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
window.onload = function() {
@ridho1991
ridho1991 / api.php
Created March 13, 2015 03:00
Bing Keyword Suggest
<?php
function bing_suggest($query) {
$geturl = file_get_contents ( utf8_encode ( "http://api.bing.com/osjson.aspx?query=" . $query . "" ) );
$keywords = json_decode ( $geturl, 1 );
$suggest=array();
if(isset($keywords[0])) {
$z = 1;
foreach($keywords[1] as $keys) {
$suggest [] = $keys;
$z++;