Skip to content

Instantly share code, notes, and snippets.

@spir1donov
spir1donov / Install laravel
Created January 24, 2016 08:36
Install laravel
Install Composer: curl -sS https://getcomposer.org/installer | php
Move to global: sudo mv composer.phar /usr/local/bin/composer
Check Composer: php composer.phar
Install Laravel: composer create-project laravel/laravel (directory)
cd (directory)
run on port: php -S localhost:8000 -t public
@spir1donov
spir1donov / background.js
Created January 24, 2016 08:33 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@spir1donov
spir1donov / instagram_scrape.php
Created January 24, 2016 08:32 — 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.
<?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;
}
/* WITH MODS TO ORIG -- iOS Browser Bookmarklets to launch other apps and stuff */
/* ver 2014-04-14a */
/* backing up my "Open In" bookmarks */
// note iOS6 requires some changes to these
// BEGIN TESTING STUFF -- IN PROFRESS LIKELY NOT WORKING
// SOME WORK, MOST tests are not WORK --
// PINNER APP TEST STUFF (as a private one)
// the page title as the title and your selected text as the description.