Skip to content

Instantly share code, notes, and snippets.

View Abdullamhd's full-sized avatar

Abdullah Mohammed Abdullamhd

View GitHub Profile
@Abdullamhd
Abdullamhd / multiple_file_upload.dart
Last active September 30, 2019 19:04
multiple file upload using dart programming language
import 'package:http/http.dart' as http;
import 'dart:io';
import 'package:http_parser/http_parser.dart';
import 'package:mime/mime.dart';
void main() async {
var uri = Uri.parse('http://localhost:3000/');
var request = http.MultipartRequest('POST', uri ,);
var path = File('b1.jpeg').path ;
@Abdullamhd
Abdullamhd / write_stream.js
Created September 30, 2019 19:53
write income files as stream in node js and express
const express = require('express')
const multer = require('multer')
const upload = multer()
const app = express()
var fs = require('fs');
app.post('/',upload.array('file',4),(req,res)=>{
req.files.forEach((file)=>{
console.log(file)
@Abdullamhd
Abdullamhd / push_notification.java
Last active February 20, 2020 09:12
sending push notification from java
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.messaging.FirebaseMessaging;
import com.google.firebase.messaging.FirebaseMessagingException;
import com.google.firebase.messaging.Message;
import com.google.firebase.messaging.Notification;
import org.junit.Before;
import org.junit.Test;
@Abdullamhd
Abdullamhd / main.dart
Created March 1, 2020 07:40
isolate example in dart programming language
/// dart complete isolate example
import 'dart:io';
import 'dart:async';
import 'dart:isolate';
Isolate isolate;
void start() async {
ReceivePort receivePort= ReceivePort(); //port for this main isolate to receive messages.
@Abdullamhd
Abdullamhd / pi_chart.dart
Created May 2, 2020 11:07
this is pure pi chart in dart programming language
// chart data
List expenses = [
{"name":"Groceries","amount":500.0},
{"name":"Online Shopping","amount":100.0},
{"name":"Eating out","amount":80.0},
@Abdullamhd
Abdullamhd / vscode_shortcuts.md
Created October 16, 2021 06:55 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

import imp
import random
import urllib.request
import threading
def generate_credit_card_number():
cc_number = [0] * 15
for i in range(15):
cc_number[i] = random.randint(0, 9)