Skip to content

Instantly share code, notes, and snippets.

View amirtds's full-sized avatar
💻
Working from home

Amir Tadrisi amirtds

💻
Working from home
View GitHub Profile
@amirtds
amirtds / Hacker_school_residents_scrapper
Created January 17, 2015 15:29
This file is just for demonstration of the coding in pyhton to hacker school
__author__ = 'amir'
#First of all let's install Python request :) through the --> pip install requests
#install BeautifulSoup for pulling out the data--> pip install BeautifulSoup or apt-get install python-bs4 (ubuntu)
import requests
from bs4 import BeautifulSoup
#define the url that we want pull out the data from
url = "https://www.hackerschool.com/residents"
#making a request to our url
@amirtds
amirtds / livestreamingyoutube
Created April 26, 2016 20:06 — forked from laurenarcher/livestreamingyoutube
Livestreaming to Youtube Live, Ubuntu, Linux FFMPEG
Terminal Commands:
One webcam:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Common Vagrant Commands

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
  • vagrant status -- outputs status of the vagrant machine
  • vagrant halt -- stops the vagrant machine
  • vagrant reload -- restarts vagrant machine, loads new Vagrantfile configuration
  • vagrant provision -- forces reprovisioning of the vagrant machine

Keybase proof

I hereby claim:

  • I am amirtds on github.
  • I am amirtds (https://keybase.io/amirtds) on keybase.
  • I have a public key ASADxJgw2Fcrxk9dOKXkjM_wZtbWBnxHXX99E0Xv4mgHpQo

To claim this, I am signing this object:

@amirtds
amirtds / install-comodo-ssl-cert-for-nginx.rst
Created August 20, 2017 15:08 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

import csv # for reading and manipulating the CSV file
import MySQLdb #Mysql Connector
#Establish connection to MysqlDB
mysql_db = MySQLdb.connect(host="", user="root", password="", db="edxapp", port=3306)
#create a cursor for sql statments
mysql_cursor = mysql_db.cursor()
# container for users emails, their countries and their foriegn key id

Keybase proof

I hereby claim:

  • I am amirtds on github.
  • I am amirtds (https://keybase.io/amirtds) on keybase.
  • I have a public key ASAlNFIhN2XxTjLe0_rYDtju7cat7vnl9YSD6ZMzY_B2Wgo

To claim this, I am signing this object:

@amirtds
amirtds / README-Template.md
Created January 24, 2019 13:13 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@amirtds
amirtds / .gitconfig
Created February 12, 2019 00:38 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@amirtds
amirtds / id_rsa.pub
Last active August 5, 2020 17:25
Public Keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOUsDkEbPt4RnosMVJzzbcoVcqKDpgb4grhF5NkP7oLo8OkBmU2KNzc7L7sXwxpdGlI2qNPxdCPeVNPRRrwX6vsI4Tr6WiZ+zZuNNYduS+bvLYDdBlV3RupN90hKL9rXBEb1AN8JJLXYtmWGegqowKmEGRRCSgHwC+M2Y1IlVm3YXVZsJFXMzbdJGkP6gB1xwVKdPRIzp/x+Cyye+uBp3b4jVT56p9835ise9P+Y270vJsfKS5UwheJtFokcibXA1+9FTHa0PRI5SglvkwYBKQ+ynCOoLQtmTCqR/vMWdHtDUzSfjiQOumHRFXojZo3DrTQo2WFihV2GnX3Sbevixt amir@