Skip to content

Instantly share code, notes, and snippets.

View innat's full-sized avatar
:octocat:
Working from home

Mohammed Innat innat

:octocat:
Working from home
View GitHub Profile

step 1: run the followng command in terminal

sudo apt-get upadate && sudo apt-get dist-upgrade

step 2: download node.js for linux by typing the followng command

FFmpeg

A complete, cross-platform solution to record, convert and stream audio and video. Compiling for the Raspberry Pi takes a little more patience and care. Took lots of time to fully implement it on Pi using USB webcam. However, We also like to include support for H264 video, which needs to be installed before compiling FFmpeg. But one can skip this and simply move on to install FFmpeg only.

Important Information

From FFmpeg - ffserver has been removed. It's mean if we install latest version of FFmpeg, we won't get ffserver. However, let's download FFmpeg 3.4.4 "Cantor". We've downloaded and remane it only ffmpeg and save to Pi desktop. It has ffserver into it. However, it's a tar.xz file and we need to extract it. After extracting, name it simply ffmpeg. To extract, first install xz-utils package.

sudo apt-get install xz-utils

and use following command to extr

@innat
innat / tic tac toe.py
Last active June 4, 2019 14:48
implementation of tac tac toe game in python
# For using the same code in either Python 2 or 3
from __future__ import print_function
## Note: Python 2 users, use raw_input() to get player input. Python 3 users, use input()
'''
Step 1: Write a function that can print out a board. Set up your board as a list, where each index 1-9 corresponds with a number on a number pad, so you get a 3 by 3 board representation.
'''
@innat
innat / Gennymotion.md
Last active May 2, 2018 00:10
Google_App_On_GennyMotion

Step One : Download Gennymotion

Step Two : Download Genymotion-ARM-Translation and drag and drop on the running enulator. Sometimes you need to do it manually.

Step Three : Downlaod following Droid infd app , then drag and drop on the emulator - it should open properly. Then tab to 'System' tab and see 'Instruction set' - it might be x86 architecture.

Step Four : Ddownload proper GAPPS packages by seleting the proper paremeter such as 'Platform' 'Android' 'Variant' and donload the file - then drag and drop it on the emulator. It should successfully flash. Reboot emulator.

@innat
innat / X11 Forwarding using Putty on Windows.md
Created May 8, 2018 15:23
Setting show to execute Linux GUI apps remotely using ssh - putty client and forwarding X11 content to a local windows Xming

Necessary Softwar

Install all of them and using putty remotely access to raspberry pi. We need to configure something.Type following command to edit a config file.

sudo nano /etc/ssh/ssh_config

following item need to change..

General Commands

  • apt-get update

    Synchronizes the list of packages on your system to the list in the repositories. Use it before installing new packages to make sure you are installing the latest version.

  • apt-get upgrade

    Upgrades all of the software packages you have installed.

  • clear

    Clears previously run commands and text from the terminal screen.

@innat
innat / capture _events.py
Created May 9, 2018 20:30
Capture the mouse click events in Python and OpenCV
# Capture the mouse click events in Python and OpenCV
'''
-> draw shape on any image
-> reset shape on selection
-> crop the selection
run the code : python capture_events.py --image image_example.jpg
'''
@innat
innat / Pig Latin.py
Created May 14, 2018 13:32
encrypt language :P
# One Way
word_string = input("Input a word: ")
while word_string[0].lower() not in ['a','e','i','o','u']:
word_string = word_string[1:] + word_string[0:1]
else:
print(word_string + 'ay')
@innat
innat / FFmpeg | Basic Operation on Subtitles.md
Last active February 21, 2024 02:32
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
@innat
innat / OpenCV_3_Python_3x.md
Last active November 24, 2018 15:53
Installing OpenCV3 for Python3x

Supported Python versions

Python 2.7 is the only supported version in 2.x series. Python 3.x releases follow Numpy releases. For example Python 3.3 is no longer supported by Numpy so support for it has been dropped in opencv-python, too.

Currently, builds for following Python versions are provided:

  • 2.7
  • 3.4
  • 3.5