Skip to content

Instantly share code, notes, and snippets.

View muhammedfurkan's full-sized avatar
🙃

M.Furkan muhammedfurkan

🙃
View GitHub Profile
@harv
harv / glibc-2.17_centos6.sh
Last active June 20, 2025 05:10
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active July 27, 2025 05:36
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@stevenvandervalk
stevenvandervalk / setup-certbot-script.sh
Created February 8, 2017 11:38
A bash script to install certbot and add crontab to renew the cert
#!/bin/bash
#
# This sets up Let's Encrypt SSL certificates and automatic renewal
# using certbot: https://certbot.eff.org
#
# - Run this script as root.
# - A webserver must be up and running.
#
# Certificate files are placed into subdirectories under
# /etc/letsencrypt/live/*.
@Integralist
Integralist / asyncio.wait.py
Last active May 25, 2022 11:55
[Wait for multiple Python futures to finish using asyncio.wait()] #asyncio #wait #concurrency #multiple #requests #httpclient
import time
import asyncio
import requests
domain = 'http://integralist.co.uk'
a = '{}/foo?run={}'.format(domain, time.time())
b = '{}/bar?run={}'.format(domain, time.time())
async def get(url):
print('start: ', url)
@mr
mr / libcurl-example.c
Created July 22, 2016 00:48
libcurl example
#include <stdlib.h>
#include <stdio.h>
#include <curl/curl.h>
#include <pthread.h>
#define PATH1 ""
#define URL1 ""
#define PATH2 ""
@Humoud
Humoud / regex-arabic.md
Last active June 2, 2025 01:57
Detecting arabic characters with regex.

Detect all Arabic Characters:

/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/

Summary:

  Arabic (0600—06FF, 225 characters)

  Arabic Supplement (0750—077F, 48 characters)
@BeMg
BeMg / perfect.c
Created January 13, 2016 08:32
perfect
#include <stdio.h>
#include <stdlib.h>
int ans(int n){
int sum=0;
for(int i=1; i<n; i++){
if(n%i==0){
sum+=i;
}
if(sum>n)
@Dryam
Dryam / nps_install.sh
Last active October 9, 2023 07:29
simple bash script for installing and configuring nginx whit google page speed module
#!/bin/bash
clear;
echo 'Wellcome to nginx page speed install script';
sleep 2;
#update system
echo 'Update the system first';
sleep 2;
sudo apt-get update ;
sudo apt-get -y upgrade;
@ankitshekhawat
ankitshekhawat / swatching.py
Last active January 9, 2023 19:59
A quick python code to detect color of an item from ecommerce website using just kmeans without OpenCV. Nowhere close to accurate but good for a quick hack. Can be improved with Sobel edge detection and skin detection.
import numpy as np
from PIL import Image, ImageDraw
import colorsys, random
from pylab import plot,show
from numpy import vstack,array
from numpy.random import rand
from scipy.cluster.vq import kmeans,vq
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
// GIO demo
#include <libsoup/soup.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
typedef struct {
char buf[1024];
gsize bytes;