Skip to content

Instantly share code, notes, and snippets.

View anabellaspinelli's full-sized avatar

Anabella anabellaspinelli

  • Barcelona, Spain
View GitHub Profile
@anabellaspinelli
anabellaspinelli / Multiple GitHub Accounts.md
Last active June 18, 2017 03:38
Using 2 (or more) GitHub accounts on the same machine

Setting up another GitHub account

And then adding remotes and users accordingly
  1. First, create a new SSH key and link it to the new GitHub account you want to use. When prompted to choose the file, change it to another different than the default one. Remember to give a full path, otherwise it will be created on the current directory. This is the process for this step: https://help.github.com/articles/generating-ssh-keys/

  2. Add the hosts on /Users/dev/.ssh/config. If the file doesn't exist, create it. Example:

     Host github.com-anabellaspinelli
         HostName github.com
    

User git

@anabellaspinelli
anabellaspinelli / Set up Selenium.md
Last active July 16, 2017 21:05
Setting up Selenium with Java, Maven, Eclipse and Mac

Initial Steps

  1. Install Java and JDK
  2. Setup JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
  1. Download and install Maven (follow instructions in the maven readme file)
  2. Download Firefox (or any other supported browser)
  3. Download its driver (in Firefox's case, GeckoDriver).
/* Two elements in the row */
.two.shoulder {
width: 48%;
padding: 1%;
}
.two.spaced {
width: 46%;
padding: 1%;
@anabellaspinelli
anabellaspinelli / accent-words.js
Created July 17, 2018 17:04
Logic behind graphical accents in Spanish
const endingLetters = ['n', 's', 'a', 'e', 'i', 'o', 'u']
const accentWord = myWord => {
let syllables = WordUtils.splitIntoSyllables(myWord)
let numberOfSyllables = syllables.length
if ( WordUtils.getWordType(myWord) === 'esdrújula' ) {
syllables[numberOfSyllables - 3].addAccent() // example: o RÉ ga no || bo LÍ gra fo
return syllables.join('')
}
<html>
<body>
<div class="board">
<div class="nigiri">
<h1>/ / / / /</h1>
</div>
<div class="nigiri">
<h1>/ / / / /</h1>
</div>
<div class="nigiri">
.nigiri {
margin: 0 10px; /* fixed 10px margin and padding... for now! */
padding: 0 10px;
float: left;
/* Extra things to makit look nice */
background-color: #fff;
border-radius: 100px;
box-shadow: inset -3px -6px 0 0 #ece0cd;
}
.nigiri-plate {
background-color: #223;
border-radius: 20px;
}
.nigiri-plate:after {
content: "";
display: block;
clear: both
}
@anabellaspinelli
anabellaspinelli / sushi-markup-2.html
Last active July 24, 2018 14:53
Nigiris with a plate container
<html>
<body>
<div class="nigiri-plate">
<div class="board">
<div class="nigiri">
<h1>/ / / / /</h1>
</div>
<div class="nigiri">
<h1>/ / / / /</h1>
</div>
window.onload = function() {
var loginButton = document.createElement('a')
var loginButtonImg = document.createElement('img')
var dataset = document.querySelector('script[name=tf-login]').dataset
console.log(dataset['redirect_uri'])
var oauthUrl =
'https://api.typeform.com/oauth/authorize?client_id='
@anabellaspinelli
anabellaspinelli / setup-https-remote.md
Last active July 30, 2018 09:46
Set up an https remote

Add an HTTPS remote for origin

Intro

If you're having the all time classic Broken pipe: the remote hung up unexpectedly error, a quick way to solve it is switching your computer to another wifi network (like the one your smartphone can provide).

But if this keeps happening it's a pain to have to do it constantly. So another solution can be to set up a new remote (the thing that knows where the GitHub repo is), but this time through https instead of ssh. This way, if you get the broken pipe, you can patch it up in a single command.

Steps

  1. Go to the repo in GitHub
  2. Select Clone or Download
  3. Select Use HTTPS