This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//returns a big old hunk of JSON from a non-private IG account page. | |
function scrape_insta($username) { | |
$insta_source = file_get_contents('http://instagram.com/'.$username); | |
$shards = explode('window._sharedData = ', $insta_source); | |
$insta_json = explode(';</script>', $shards[1]); | |
$insta_array = json_decode($insta_json[0], TRUE); | |
return $insta_array; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- vscode | |
- atom | |
- notepad | |
- notepad ++ | |
- gedit | |
- Sublime Text | |
- Brackets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>title is here</title> | |
</head> | |
<body> | |
<button onclick="test()" style="width:100px; height:100px;">click here</button> | |
</body> | |
<script> | |
function test(){ | |
alert("clicked!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="fa"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Title</title> | |
<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]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://jgthms.com/minireset.css/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias xampp-start="sudo /opt/lampp/lampp start" | |
alias xampp-stop="sudo /opt/lampp/lampp stop" | |
alias xampp-status="sudo /opt/lampp/lampp status" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('previous', function (e) { | |
e.preventDefault(); | |
var stop = false; | |
var width = document.getElementById("mySidenav").style.width; | |
$('.modal').each(function () { | |
if ($(this).hasClass('show')) { | |
$(this).modal('hide'); | |
stop = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# تعریف متغیرهایی که نیاز داریم | |
nextYear=1398 | |
months=( | |
'فروردین' | |
'اردیبهشت' | |
'خرداد' | |
'تیر' | |
'مرداد' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# clear screen! | |
clear | |
# change Time zone to tehran in current process | |
TZ=Asia/Tehran | |
# ask for gitea backup directory on your machine | |
echo -n "Enter gitea backup full path (example: /var/log/gitea/): " |
OlderNewer