Skip to content

Instantly share code, notes, and snippets.

View elmissouri16's full-sized avatar
🏠
Working from home

Elmissouri elmissouri16

🏠
Working from home
View GitHub Profile
@GONZOsint
GONZOsint / instagram_user_information.py
Created September 14, 2022 20:21
Script to obtain Instagram user informaption
import requests
import re
import sys
import json
def obtain_ids(user):
response = requests.get('https://www.instagram.com/' + user)
appid = re.search('appId":"(\d*)', response.text)[1]
serverid = re.search('server_revision":(\d*)', response.text)[1]
@shinayser
shinayser / download_file.dart
Last active June 21, 2020 12:50 — forked from ajmaln/downloadFile.dart
Download file with progress in Dart/Flutter using 'http' package
import 'dart:async';
import 'dart:io';
import 'package:http/http.dart' as http;
///Returns the file as a stream of bytes
Future<Stream<List<int>>> downloadAsStream(String url) async {
var result = await Client().send(
Request(
"get",
import 'dart:convert';
import "dart:io";
import 'package:html/dom.dart';
import 'package:html/parser.dart' as parser;
import "package:http/http.dart" as http;
import 'package:http/http.dart';
import "package:yaml/yaml.dart";
main() async {
@ajmaln
ajmaln / downloadFile.dart
Last active February 19, 2025 08:39
Download file with progress in Dart/Flutter using 'http' package
import 'dart:typed_data';
import 'dart:io';
import 'package:http/http.dart';
import 'package:path_provider/path_provider.dart';
downloadFile(String url, {String filename}) async {
var httpClient = http.Client();
var request = new http.Request('GET', Uri.parse(url));
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace test_manual_reset_event
{
internal class Program
@msuchodolski
msuchodolski / electron_drag_disable.css
Last active December 8, 2024 12:05
Disable dragging and selecting html elements (like links, images etc...) in Electron
/**
* MAKE ELECTRON APP FEEL MORE NATIVE
*
* * Prevent dragging all HTML elements, specially:
* - images
* - links (anchors)
*
* * Prevent text selection
*/
anonymous
anonymous / gist:ff82643c9a004281544a
Created November 25, 2015 00:35
var address = NetworkInterface
.GetAllNetworkInterfaces()
.Where(i => i.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 ||
i.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
.SelectMany(i => i.GetIPProperties().UnicastAddresses)
.Where(a => a.Address.AddressFamily == AddressFamily.InterNetwork)
.Select(a => a.Address.ToString())
.ToList();
@feihong
feihong / add_metadata.py
Created February 4, 2015 21:41
Script to add metadata to all .mp4 files within a directory
"""
Add metadata to all the .mp4 files within the given directory, based on the file
names of the input files.
Each input file should use the following format for their filename:
[album] [title] [artist]
Note that there are two spaces between each element.
@domenic
domenic / promises.md
Last active April 1, 2025 01:54
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.