Skip to content

Instantly share code, notes, and snippets.

View gil00pita's full-sized avatar
💭
I may be slow to respond.

Gil Álvaro gil00pita

💭
I may be slow to respond.
View GitHub Profile
@gil00pita
gil00pita / Install.Core.Apps.txt
Last active October 27, 2021 22:01
Automation Installer for Windows, Chocolatey.https://chocolatey.org/
##############################################################
# Description: Boxstarter Script
# Author: Gil Alvaro
# Last Updated: 2020-01-08
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
@gil00pita
gil00pita / brew-install-script.sh
Last active August 13, 2021 08:02 — forked from CliffordAnderson/brew-install-script.sh
Brew install script for OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap homebrew/cask
@gil00pita
gil00pita / cloudSettings
Last active February 23, 2021 22:20
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-23T22:20:27.781Z","extensionVersion":"v3.4.3"}
@gil00pita
gil00pita / cloudSettings
Last active February 5, 2021 20:48
Mac Home
{"lastUpload":"2021-02-05T20:48:30.504Z","extensionVersion":"v3.4.3"}
const array = [
[ 'one', 1 ],
[ 'two', 2 ]
];
Object.fromEntries(array);
// { one: 1, two: 2 }
<template>
<div>
<h1 class="title">Student Averages</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Score</th>
<th>Grade</th>
<th>Teachers</th>
<template>
<section class="container">
<Sites v-bind="sites" />
<Scores v-bind="scores" />
</section>
</template>
<script>
import Scores from '~/components/Scores.vue'
import Sites from '~/components/Sites.vue'

Fire up a terminal.

  1. [IMPORTANT] sudo cp /etc/fstab /etc/fstab.old - Create a backup of the fstab file just in case something unwanted happens.
  2. sudo blkid - Note the UUID of the partition you want to automount.
  3. sudo nano /etc/fstab - Copy the following line to the end of the file, save it and reboot afterwards to check if it worked.
  4. mkdir /my/path/tomount # to quote : "you must create the mount point before you mount the partition." see https://help.ubuntu.com/community/Fstab

Examples

A common setup is:

@gil00pita
gil00pita / class_properties.jsx
Last active February 8, 2019 23:17 — forked from gisderdube/class_properties.jsx
https://levelup.gitconnected.com/9-tricks-for-kickass-javascript-developers-in-2019-eb01dd3def2a ### Class properties & binding Binding functions in JavaScript is a common task. With the introduction of arrow functions in the ES6 spec, we now have
class Counter extends React.Component {
constructor(props) {
super(props)
this.state = { count: 0 }
}
render() {
return(
<div>
<h1>{this.state.count}</h1>
@gil00pita
gil00pita / default.js
Last active February 8, 2019 23:15 — forked from gisderdube/default.js
https://levelup.gitconnected.com/9-tricks-for-kickass-javascript-developers-in-2019-eb01dd3def2a ### Destructuring & default values Let’s return to our previous example where we do the following: ``` const result = axios.get(`https://ironhack-pok
function calculate({operands = [1, 2], type = 'addition'} = {}) {
return operands.reduce((acc, val) => {
switch(type) {
case 'addition':
return acc + val
case 'subtraction':
return acc - val
case 'multiplication':
return acc * val
case 'division':