Skip to content

Instantly share code, notes, and snippets.

View kabeer11000's full-sized avatar
💭
Adding Bugs to fix later

Kabeer Jaffri kabeer11000

💭
Adding Bugs to fix later
View GitHub Profile
//------JAVASCRIPT EXAMPLE--------//
/* MAIN FUNCTION TO UPLOAD STRING AS TEXT FILE TO SERVER */
function UploadFile(data, folderid)
{
var formData = new FormData();
//File Mime Type
var blob = new Blob([data], { type: 'plain/text' });
//*IMPORTANT*. Kabeers Drive will only accept if paramenter name is 'file[]' (Array)
formData.append('file[]', blob,'temp.txt');
var request = new XMLHttpRequest();
//Getting Top Charts Data
function getData() {
$.getJSON("https://kabeer11000.github.io/JSONAPIS/music/top-chart.json", function (data) {
for (let i in data) {
//Got Data!, Console Logging Data name
console.log(data.name[i]);
}
});
}
$(document).ready(function() {
$.getJSON('https://kabeer11000.github.io/JSONAPIS/prominecraft/minecraft.json', function(data) {
for (var i = 0; i < data.length; i++) {
console.log(data[i].name)
}
});
});
function getData(q) {
const api_key = 'Your API Key Here';
$.getJSON("https://www.omdbapi.com/?s=" + q + "&apikey=" + api_key, function(data){
for (var i = 0; i < data.Search.length; i++) {
console.log(data.Search[i].Title);
}
});
}
getData('fast+and+the+furious');
$.get("https://kabeer11000.github.io/sample-response/CDNs/cdn-response.json", function(data, status){
//Log Total Packages to The Console
console.log('Total Packages : '+data.TotalLibs);
for(let i=;i<data.Libs.length;i++){
//Log name of each Library to the Console
console.log(data.Libs[i].name);
}
//Log Response Status to the console
console.log("Status: " + status);
function getIncidents(){
$.get("https://kabeers-network.ueuo.com/u/api/incidents.php", function(data, status){
//Console Log if More Data Mode is enabled
console.log(data.more);
for(let i=;i<data.incidents.length;i++){
//Log Title of each Service Incident to the Console
console.log(data.incidents[i].title);
}
//Log Response Status to the console
console.log("Status: " + status);
$.ajax('https://rss.app/feeds/HRB8LpHHEcj0nPz6.xml', {
accepts: {
xml: "application/rss+xml"
},
dataType: "xml",
success: function(data) {
$(data)
.find("item")
.each(function() {
const el = $(this);
$.ajax('https://sites.google.com/site/xgames6996/home/posts.xml', {
accepts: {
xml: "application/rss+xml"
},
dataType: "xml",
success: function(data) {
$(data)
.find("item")
.each(function() {
const el = $(this);
/*
-Kabeers Notes
(©) 2020 Kabeers Network - All Rights Reserved
(©) Author(s) Kabeer Jaffri,
*/
/*-----------------------------------------------
Ping + Created Async LocalStorage System
------------------------------------------------*/
function ping() {
let e = !1;
<?php
//Javascript ki zaroorat nahi yeh sirf php code use karay ga
$server = "localhost";
$user = "root";
$password = "";
$db = "userregistration";
try {
$con = mysqli_connect($server, $user, $password, $db );
}catch(Exception $e) {