Skip to content

Instantly share code, notes, and snippets.

View fatihgvn's full-sized avatar
🏠
Always work from home

Fatih Güven fatihgvn

🏠
Always work from home
View GitHub Profile
@mgilank
mgilank / InstagramFecthMediaAjax.php
Created April 7, 2018 10:36 — forked from darkterminal/InstagramFecthMediaAjax.php
Fecth Instagram Media by Username using PHP without Instagram API
<?php
/**
* [getMediaByUsername description]
*
* Author : Imam Ali Mustofa - Betta Dev Indonesia
* Website : www.bettadevindonesia.com
*
* This function will scrap data from instagram without API
* Define username you need and define how many media will you get!
@drazisil
drazisil / pretty-json.php
Last active October 12, 2021 16:15
Pretty-print a JSON string in PHP.
<?php
/**
* Formats a JSON string for pretty printing
*
* @param string $json The JSON to make pretty
* @param bool $html Insert nonbreaking spaces and <br />s for tabs and linebreaks
* @return string The prettified output
* @author Jay Roberts
*/
@robulouski
robulouski / gmail_imap_dump_eml.py
Last active April 10, 2024 12:58
Very simple Python script to dump all emails in an IMAP folder to files.
#!/usr/bin/env python
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
#
import sys
import imaplib
import getpass
@nichtich
nichtich / README.md
Last active June 6, 2024 02:05 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@biswarupadhikari
biswarupadhikari / subdir.php
Created January 4, 2013 15:34
is_subdir php function. How to check is sub directory is php
<?php
function is_subdir($parent,$sub){
$parent=rtrim($parent,'/');
$sub=rtrim($sub,'/');
$parent=explode('/',$parent);
$sub=explode('/',$sub);
for($i=0;$i<count($parent);$i++){
if($parent[$i]!=$sub[$i]){
return false;
}
@adrianratnapala
adrianratnapala / instaweb.py
Created December 29, 2011 19:29
Tiny web servers in python
#!/usr/bin/python3
# small web server that instruments "GET" but then serves up files
# to serve files using zero lines of code, do
#
# python -m http.server 8080 # python 3
#
# or
#
# python -m SimpleHTTPServer 8080 # python 2
#