Skip to content

Instantly share code, notes, and snippets.

View WagnerMoreira's full-sized avatar

Wagner Moreira WagnerMoreira

View GitHub Profile
@WagnerMoreira
WagnerMoreira / angularjs-scedelegate-whitelist
Created October 19, 2015 19:10 — forked from robhimslf/angularjs-scedelegate-whitelist
Populating AngularJS's resource URL whitelist enables the use of remotely located views and partials hosted on a different domain (e.g., Amazon S3).
/*
* Standard AngularjS bootstrap code.
*/
var app = angular.module('remote-partials-views',
['ui.router',
'ngResource',
'ngSanitize']);
/*
* AngularJS is good enough to come with a whitelist for resource URLs. It just
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@WagnerMoreira
WagnerMoreira / gist.js
Created December 20, 2016 19:41 — forked from adammw/gist.js
Spotify Web Player Hacks
// Get the Spotify.Core instance
var spotify = Spotify.Instances.get(/(SPFBIn_\d+)_player/.exec(document.querySelector('[id^="SPFBIn"]').id)[1]);
// Request the 160kbps MP3 url for a specific track
spotify.services.storageResolver.list('spotify:track:0M3adYbGtyRHACP86dey1H', '', function(data) { console.log('Opening MP3 in new window:', a.uri); window.open(a.uri); }, function(e){ console.log('Error:', e); });

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@WagnerMoreira
WagnerMoreira / tmux.md
Created August 18, 2017 00:28 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@WagnerMoreira
WagnerMoreira / tmux-cheatsheet.markdown
Created August 18, 2017 00:28 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@WagnerMoreira
WagnerMoreira / rxjs_operators_by_example.md
Created September 28, 2017 20:05 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@WagnerMoreira
WagnerMoreira / introrx.md
Created January 9, 2018 15:38 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

How to fix 'Could not restore untracked files from stash' issue

Convert a stash to a temporary branch

git stash branch STASHTEMPBRANCH

Apply your stash

git stash apply

@WagnerMoreira
WagnerMoreira / NavigationPrompt.jsx
Created August 12, 2020 20:18 — forked from bummzack/NavigationPrompt.jsx
A replacement component for the react-router `Prompt`.
import React from 'react';
import {withRouter} from 'react-router-dom';
import PropTypes from 'prop-types';
/**
* A replacement component for the react-router `Prompt`.
* Allows for more flexible dialogs.
*
* @example
* <NavigationPrompt when={this.props.isDirty}>