Skip to content

Instantly share code, notes, and snippets.

View jonathans199's full-sized avatar
😎
Coding away.....

Jonathan Sanchez jonathans199

😎
Coding away.....
View GitHub Profile
@jonathans199
jonathans199 / .gitignore
Last active July 16, 2023 21:44
Node Express API deployed to Vercel
node_modules
@jonathans199
jonathans199 / gist:ba0fd253505ac563d58ccc8d13eedac8
Created May 4, 2021 00:46
Publish your React app to Firebase Hosting
npm i -g firebase-tools
firebase login
firebase init
we learned
// name this function get coffess and export it
exports.getCoffeesTitles = function () {
// filter all coffees which is an array of objects
const coffeeTitles = allCoffees.filter(function(item){
// return each coffee with its title
return item.title
@jonathans199
jonathans199 / setup-net-centos-min-install.txt
Created April 9, 2019 22:02
How to setup network after CentOS 7 minimal installation
After installing RHEL/CentOS 7 minimal, You may not able to connect network in that machine. This will happen because Ethernet interfaces are not enabled by default.
This guide explain you to setup network on RHEL/CentOS 7.
Setup network on CentOS 7 minimal
First, type “nmcli d” command in your terminal for quick list ethernet card installed on your machine:
"nmcli d" command output
“nmcli d” command output
Type “nmtui” command in your terminal to open Network manager. After opening Network manager chose “Edit connection” and press Enter (Use TAB button for choosing options).
@jonathans199
jonathans199 / original-httpd-vhosts.conf
Created April 9, 2019 18:03
original-httpd-vhosts.conf
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
after_action :notify_channel, only: [:destroy, :update, :create]
def index
@users = User.all
end
def show
end
@jonathans199
jonathans199 / Guess_Number_game.rb
Last active August 19, 2017 16:09
Guess a Number between 1-100 game
# clears the screen
system "clear"
#welcomes user to game
puts "Welcome to my game"
puts "what is your name?"
#getting uses name
name = gets.chomp
# clears screen
system "clear"
#defines method to add and center the ****
def add_asterisks_withtext(text)
puts ("*"*100).center(110)
sleep 1
puts text.center(110)
sleep 1
puts ("*"*100).center(110)