Skip to content

Instantly share code, notes, and snippets.

Alex Arul aa21

  • Hatcher, Blk 71
  • singapore
Block or report user

Report or block aa21

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mentor_notifications.php
<?php
class MM_Notifications {
private $usr_mentor;
private $usr_mentee;
private $mentor_action;
private $email_codes;
private $notice_type;
private $debug_email;
@aa21
aa21 / Project Ideas.md
Last active Aug 24, 2016
Learning / Mastering a language
View Project Ideas.md
View change_timezone_in_iso8601_date_string.php
<?php
// if it's not a ISO8601 date string, skip it
if(stripos($v , "T") === false) continue;
$dateval = $v;
// create ISO8601 dateTime
$date = DateTime::createFromFormat(DateTime::ISO8601, $dateval);
// set to user's timezone
$date -> setTimeZone($dt_user_timezone);
@aa21
aa21 / instagram_scrape.php
Created Jun 17, 2016 — 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.
View instagram_scrape.php
<?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;
}
@aa21
aa21 / instagram-fetcher.php
Created Jun 17, 2016 — forked from shahril96/instagram-fetcher.php
Simple Instagram media info fetcher
View instagram-fetcher.php
<?php
/*
* title : simple instagram info fetcher
*
* author : shahril
* receipant : afif zafri
* date : 29-dis-2015
*/
View git.git
-- ignore changes to local file, db, config etc.
git update-index --assume-unchanged [<file>...]
.git/info/exclude
.gitignore
View Regex
# Word not in string
^((?!cat).)*$ <-- Match sentence not containing 'cat'
View vim.vim
# Learn Vim Fast
https://robots.thoughtbot.com/the-vim-learning-curve-is-a-myth
# VIM Tutorial
http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
# Derek Wyatt's awesome vim series
http://vimeo.com/user1690209/videos
# Vimcasts
@aa21
aa21 / books.md
Last active Oct 1, 2015
Coding Books etc
View books.md
@aa21
aa21 / .php
Last active Oct 18, 2016
PHP - Aligning tabs, finding emails in string, remove empty columns from csv/data-grid array ..
View .php
<?php
// PRINT TAB ALIGNED COLUMNS
// %- and % are left and right aligns
$mask = "| %-30.30s | %10.10s | %10.10s |\n";
printf($mask, 'Host' , 'Results', 'Share');
printf($mask, $test_host, $total_results, $share_round);
You can’t perform that action at this time.