Skip to content

Instantly share code, notes, and snippets.

View mirsahib's full-sized avatar
🎯
Focusing

Mir Habib Ul Latif 🇧🇩 🇵🇸 mirsahib

🎯
Focusing
View GitHub Profile
@mirsahib
mirsahib / ffmpeg.md
Created May 22, 2018 07:48 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@mirsahib
mirsahib / OS161_set-up.md
Created September 25, 2018 13:20 — forked from gerito1/OS161_set-up.md
A simple guide to have running the os161 kernel in Arch Linux

A simple guide to have running the os161 kernel in Arch Linux

This are some notes for the course OS 161 from ops-class.org (based on the OS 161 course from Harvard).

#Geting started

You will need some tools. A nice Text Editor or a fancy IDE for C, I usually go for gedit, or sometimes vim.

Then you will need to install all the toolchain for the course plus some other tools

function brightness()
I = imread('AtlasMercury.tiff');
J=I;
%increase brightness
[r,c,l] = size(I);
g = 100;%transformed value
for i=1:l
for j =1:r
for k=1:c
if(I(j,k,i)+g<256)
function contrast()
I = imread('AtlasMercury.tiff');
J=I;
[r,c,l] = size(I);
a = 1.5;%transformed value
I = double(I);
for i=1:l
for j =1:r
for k=1:c
t = ceil(((a*I(j,k,i))-127)+127);
#include<pthread.h>
#include<stdio.h>
#include<stdlib.h>
pthread_mutex_t x,wsem;
pthread_t tid;
int readcount;
void intialize()
var Student = new Array();
$(document).ready(function(){
$.ajax({
url: "http://localhost/public_html/Final_project/student_2017.php",
method:"GET",
success:function (data) {
console.log(data);
for(i in data){
Student.push(data[i]);
try:
import Queue as Q
except:
import queue as Q
class node:
def __init__(self,nodeId,cost,predecessor,visited):
self.nodeId = nodeId
self.cost = cost
-64 -56 -61 -66 -71 -82 -81 1
-68 -57 -61 -65 -71 -85 -85 1
-63 -60 -60 -67 -76 -85 -84 1
-61 -60 -68 -62 -77 -90 -80 1
-63 -65 -60 -63 -77 -81 -87 1
-64 -55 -63 -66 -76 -88 -83 1
-65 -61 -65 -67 -69 -87 -84 1
-61 -63 -58 -66 -74 -87 -82 1
-65 -60 -59 -63 -76 -86 -82 1
-62 -60 -66 -68 -80 -86 -91 1
$(document).ready(function() {
loadApiData(function showApiData() {
//display the localstorage data
nowPlaying = JSON.parse(localStorage.getItem("now_playing"));
upComming = JSON.parse(localStorage.getItem("upcomming"));
popular = JSON.parse(localStorage.getItem("popular"));
console.log(nowPlaying);
console.log(upComming);
console.log(popular);
//database setting
var db_url =
"mongodb+srv://mirsahib24:[email protected]/rotten-pumpkin?retryWrites=true&w=majority";
mongoose.connect(db_url, { useNewUrlParser: true });
mongoose.connection.on("error", function(err) {
console.log(err);
console.log("Could not connect to mongodb");
});