Skip to content

Instantly share code, notes, and snippets.

View herrera-ignacio's full-sized avatar
💻
Hacking

Nacho Herrera herrera-ignacio

💻
Hacking
View GitHub Profile
@herrera-ignacio
herrera-ignacio / tags_demo.html
Last active January 5, 2019 23:23
Examples of most common html tags
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web title</title>
<!--
CSS
JS
Google fonts
Metadata (keywords, description, robots, author, owner)
@herrera-ignacio
herrera-ignacio / multimediaTags.html
Created January 5, 2019 23:22
Examples of multimedia tags
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Multimedia Tags</title>
</head>
<body>
<!-- May set up params from CSS-->
@herrera-ignacio
herrera-ignacio / setup_android_emulator
Created July 9, 2019 14:12
Android emulator usefull commands
emulator -list-avds
adb devices
emulator @avd_name -no-boot-anim
adb shell input keyevent 82
adb shell input text 'rr'
adb logcat
@herrera-ignacio
herrera-ignacio / python_virtualenv.md
Last active July 16, 2019 00:53 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install Python's virtual environment

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo -H pip3 install virtualenv 
@herrera-ignacio
herrera-ignacio / ec2-apache.sh
Created July 26, 2019 01:01
EC2 User data: install Apache web server for Amazon Linux 2 Image
#!/bin/bash
########################################
##### USE THIS WITH AMAZON LINUX 2 #####
########################################
# get admin privileges
sudo su
# install httpd (Linux 2 version)
@herrera-ignacio
herrera-ignacio / config.toml
Last active February 20, 2020 12:37
Gitlab-runner configuration to build and run docker images
# /etc/gitlab-runner/config.toml
concurrent = 10
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = $RUNNER_NAME
@herrera-ignacio
herrera-ignacio / asyncUnderTheHood.js
Created February 5, 2020 19:07
Javascript async vs promise example
const asyncTask = (taskNumber) => new Promise((resolve, reject) => {
setTimeout(() => {
console.log(`Async task-${taskNumber} done`);
resolve();
}, Math.random() * 1000 * 3);
});
const asyncJob = async () => {
console.log('Starting Async Job');
await asyncTask(1);
@herrera-ignacio
herrera-ignacio / console.js
Created February 10, 2020 22:36
The power of JavaScript console!
// Correct usage of console.log
const foo = { name: 'Nacho', age: 25, role: 'Fullstack' }
const bar = { name: 'Rama', age: 26, role: 'Frontend' }
const baz = { name: 'Tito', age: 27, role: 'Frontend'
const logIt = () => console.log({ foo, bar, baz });
// Custom CSS
console.log('%c My Friends', 'color: orange; font-weight: bold;' )
logIt();
@herrera-ignacio
herrera-ignacio / mongoInOSX.md
Created March 9, 2020 01:36
Install mongodb on Mac OSX

Updated Docs

You will need Home Brew installed.

brew tap mongodb/brew
brew install mongodb-community

You can now start Mongo as a background process

@herrera-ignacio
herrera-ignacio / tmux.md
Last active March 12, 2020 19:59
tmux guide

Sessions

tmux new -s <session_name>
tmux ls
tmux attach -t <session_name>

Hit LEADER + d to detach from session.