Skip to content

Instantly share code, notes, and snippets.

View ohmydevops's full-sized avatar

Amirhossein Baghaie ohmydevops

View GitHub Profile
ohmydevops / instagram_scrape.php
Created March 8, 2017 09:16 — forked from cosmocatalano/instagram_scrape.php
Quick-and-dirty Instagram web scrape, just in case you don't think you should have to make your users log in to deliver them public photos.
//returns a big old hunk of JSON from a non-private IG account page.
function scrape_insta($username) {
$insta_source = file_get_contents(''.$username);
$shards = explode('window._sharedData = ', $insta_source);
$insta_json = explode(';</script>', $shards[1]);
$insta_array = json_decode($insta_json[0], TRUE);
return $insta_array;
ohmydevops / editors
Last active May 17, 2018 09:56
Fornt-End Editors
- vscode
- atom
- notepad
- notepad ++
- gedit
- Sublime Text
- Brackets
ohmydevops / app.html
Last active May 19, 2018 16:05
how browsers render HTML/CSS ? (day1 - sadjadiofrontend101)
<title>title is here</title>
<button onclick="test()" style="width:100px; height:100px;">click here</button>
function test(){
ohmydevops / html
Last active May 20, 2018 21:33
our base file in html for course (day2 - sadjadiofrontend101)
<!doctype html>
<html lang="fa">
<meta charset="utf-8">
<meta name="description" content="Sadjad I/O Front-end Development Course">
<meta name="author" content="@amirbagh75">
<link rel="stylesheet" href="style.css">
<!--[if lt IE 9]>
ohmydevops / reset.txt
Created June 11, 2018 03:41
Css Reset File
alias xampp-start="sudo /opt/lampp/lampp start"
alias xampp-stop="sudo /opt/lampp/lampp stop"
alias xampp-status="sudo /opt/lampp/lampp status"
ohmydevops / app.js
Created January 22, 2019 17:12
handel back button
$(window).on('previous', function (e) {
var stop = false;
var width = document.getElementById("mySidenav").style.width;
$('.modal').each(function () {
if ($(this).hasClass('show')) {
stop = true;
# تعریف متغیرهایی که نیاز داریم
ohmydevops / docker.txt
Last active July 14, 2019 21:01
docker cheat sheet
docker build -t myimagename .
docker run -p 4000:80 myimagename
docker run -d -p 4000:80 myimagename
docker exec -it [container-id] bash
docker ps
docker stop <hash>
docker ps -a
docker kill <hash>
docker rm <hash>
docker rm $(docker ps -a -q)
#! /bin/bash
# clear screen!
# change Time zone to tehran in current process
# ask for gitea backup directory on your machine
echo -n "Enter gitea backup full path (example: /var/log/gitea/): "