Skip to content

Instantly share code, notes, and snippets.

View ahmedash95's full-sized avatar

Ahmed Ammar ahmedash95

View GitHub Profile
package main
import (
"flag"
"fmt"
"net/http"
"time"
)
var port string
params := &twitter.StreamFilterParams{
Track: []string{"@ShareAsPic"},
StallWarnings: twitter.Bool(true),
}
func TweetScreenShot(username string, tweetId string) (string, error) {
chromedpContext, cancelCtxt := chromedp.NewContext(context.Background()) // create new tab
defer cancelCtxt()
// capture screenShot of an element
fname := fmt.Sprintf("%s-%s.png", username, tweetId)
url := fmt.Sprintf("https://twitter.com/%s/status/%s", username, tweetId)
var buf []byte
@ahmedash95
ahmedash95 / cli.args.php
Created April 25, 2019 08:31 — forked from jadb/cli.args.php
Parse PHP CLI arguments
http://pwfisher.com/nucleus/index.php?itemid=45
This command line option parser supports any combination of three types of options (switches, flags and arguments) and returns a simple array.
<?php
/**
* CommandLine class
*
* @package Framework
*/
/**
@extends('layouts.app')
@section('content')
<div class="container prntcntnr">
<div class="row justify-content-center">
<h1 class="page-header col-xs-12 col-md-12">
ﺃﻭاﻣﺮ اﻟﺘﺸﻐﻴﻞ
<span> اﻟﻌﺪﺩ : {{$orders->total()}}</span>
<a class="btn btn-primary btn-sl no-print" style="float: left; padding-bottom: 5px;"
href="{{ route('orders.create') }}"> جديد <span class="glyphicon glyphicon-plus"></span></a>
</h1>
{
"window.zoomLevel": 0,
"workbench.iconTheme": "material-icon-theme",
"material-icon-theme.showUpdateMessage": false,
"vsicons.dontShowNewVersionMessage": true,
"editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace",
// "editor.fontSize": 14,
// "editor.lineHeight": 25,
// "editor.fontFamily": "'SF Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.lineHeight": 25,
<div class="defaultValue container">
<!-- Put your entiner code here -->
</div>
@ahmedash95
ahmedash95 / encoding_with_avro.go
Created February 19, 2018 15:19
Test encoding with json vs avro
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
avro "gopkg.in/avro.v0"
)
@ahmedash95
ahmedash95 / pluralsight-dl.sh
Created December 14, 2017 01:09 — forked from melkopisi/pluralsight-dl.sh
download lists from pluralsight using youtube-dl
#!/bin/bash
echo "enter username : "
read username
echo "enter password: "
read -s password
echo "enter course: "
read course