This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # if not root, run as root | |
| if (( $EUID != 0 )); then | |
| sudo /update/update.sh | |
| exit | |
| fi | |
| apt update | |
| apt -y upgrade | |
| apt -y dist-upgrade | |
| apt clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fetch('https://restcountries.eu/rest/v1/name/spain').then((res) => { | |
| return res.json(); | |
| }).then((data) => { | |
| console.log(data); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "black": "#282a36", | |
| "dark_blue": "#66d9ef", | |
| "dark_green": "#a6e22e", | |
| "dark_cyan": "#a1efe4", | |
| "dark_red": "#f92672", | |
| "dark_magenta": "#ae81ff", | |
| "dark_yellow": "#fd971f", | |
| "gray": "#f5f4f1", | |
| "dark_gray": "#383830", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM openjdk:8 | |
| RUN apt-get update | |
| RUN apt-get install -y nginx openssh-server git-core openssh-client curl | |
| RUN apt-get install -y nano | |
| RUN apt-get install -y build-essential | |
| RUN apt-get install -y openssl libreadline6 libreadline6-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config | |
| RUN command curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
| RUN \curl -L https://get.rvm.io | bash -s stable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker build -t postgresql . | |
| # docker run -d -p 0.0.0.0:5432:5432 --name postgresql_inst_1 postgresql | |
| FROM ubuntu | |
| ARG usuario=usuario | |
| ARG password=password | |
| ARG database=database | |
| RUN apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http') | |
| const fetch = uri => new Promise(resolve => | |
| http.get(uri, res => { | |
| res.setEncoding('utf8') | |
| let data = '' | |
| res.on('data', chunk => data += chunk) | |
| res.on('end', () => resolve(data)) | |
| }) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse, os, re, sys | |
| MIN_MOVIE_SIZE = 5 | |
| pattern = re.compile('.*\.(mkv|avi|mp4)$') | |
| parser = argparse.ArgumentParser(description='Vacía peliculas para que no ocupen especio pero se quedan como placeholder.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component, PropTypes } from 'react' | |
| import { StyleSheet, Text, View } from 'react-native' | |
| import Router from 'react-router/MemoryRouter' | |
| import {Link, Route} from 'react-router-native' | |
| export default class App extends Component { | |
| render () { | |
| return ( | |
| <Router> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mark johansson waffle iron 80 2 | |
| mark johansson blender 200 1 | |
| mark johansson knife 10 4 | |
| Nikita Smith waffle iron 80 1 | |
| Nikita Smith knife 10 2 | |
| Nikita Smith pot 20 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| intSlice := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} | |
| for _, number := range intSlice { |
OlderNewer