Skip to content

Instantly share code, notes, and snippets.

View alexjoverm's full-sized avatar

Alex Jover alexjoverm

View GitHub Profile
@patrickhammond
patrickhammond / android_instructions.md
Last active June 6, 2024 05:19
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@unbracketed
unbracketed / branch-fu.md
Created April 7, 2015 17:49
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@ntkog
ntkog / gist:ecdf83bb1e68a136435f13d9c97f51d4
Last active November 28, 2017 10:45
One-liner : Ranking Final de las charlas de CodeMotion
var talksByLikes = [].slice.call(document.querySelectorAll('.ka-td-contents')).map((talk) => ({ title : talk.querySelector('.ka-talk-title').textContent , author: talk.querySelector('.ka-username').textContent, favs : +talk.querySelector('span.ka-button-indicator').textContent, rating : +talk.querySelector('a.ka-like-link + a.ka-social-link').textContent , ratio : talk.querySelector('a.ka-like-link + a.ka-social-link').title }));
var currentDay = /5693168230072320/.test(window.location.href)
? "5649626120060928"
: "5693168230072320";
document.querySelector(`a[data-day-id="${currentDay}"]`).click();
setTimeout(function(){
talksByLikes = talksByLikes.concat([].slice.call(document.querySelectorAll('.ka-td-contents')).map((talk) => ({ title : talk.querySelector('.ka-talk-title').textContent , author: talk.querySelector('.ka-username').textContent, favs : +talk.querySelector('span.ka-button-indicator').textContent, rating : +talk.querySelector('a.ka-like-link + a.ka-social-link').textContent, ratio: ta