Skip to content

Instantly share code, notes, and snippets.

View luizventurote's full-sized avatar

Luiz Venturote luizventurote

View GitHub Profile
@arturmamedov
arturmamedov / instagram_api.php
Created June 15, 2016 12:52
Instagram API retrive access token with PHP curl
<?php
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token#
#1 first you need to create a Client in Instgram Developer Dashboard
// https://www.instagram.com/developer/clients/manage/
#2 after you need to retrive a oAuth code for after get access_token
// https://www.instagram.com/developer/authentication/
// change the params with your one and open link in browser
@n0m4dz
n0m4dz / findLocalItems.js
Last active February 20, 2023 18:18 — forked from ungoldman/findLocalItems.js
how to filter keys from localStorage with a regex
// returns an array of localStorage items in key/value pairs based on a query parameter
// returns all localStorage items if query isn't specified
// query can be a string or a RegExp object
function findLocalItems (query) {
var i, results = [];
for (i in localStorage) {
if (localStorage.hasOwnProperty(i)) {
if (i.match(query) || (!query && typeof i === 'string')) {
value = JSON.parse(localStorage.getItem(i));
@igrigorik
igrigorik / github.bash
Last active December 22, 2023 23:55
Open GitHub URL for current directory/repo...
alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"
@Jamesking56
Jamesking56 / WordPress.class.php
Last active April 19, 2021 12:05
Read Wordpress Export XML to PHP
<?php
/**
* WordPress class - Manages the WordPress XML file and gets all data from that.
*/
class Wordpress
{
public static $wpXML;