Skip to content

Instantly share code, notes, and snippets.

View fercreek's full-sized avatar
😎
Coding coding coding

Fernando Contreras fercreek

😎
Coding coding coding
View GitHub Profile
$(function(){
var hash = window.location.hash;
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
$('.nav-tabs a').click(function (e) {
$(this).tab('show');
var scrollmem = $('body').scrollTop();
window.location.hash = this.hash;
$('html,body').scrollTop(scrollmem);
});
@fercreek
fercreek / eurotrip.csv
Last active June 17, 2018 23:29
Eurotrip cost- Part 1
Destino Costo Compañia
Londres €30.59 Vueling
Brujas €20.49 National Express
Bruselas €14.70 BIC
Luxemburgo €15.90 Flixbus
Frankfurt €21.50 Flixbus
Praga €25.00 Flixbus
#!/usr/bin/env bash
# input: file or folder
# output: file with .bak ext or folder tar.gz ext
main(){
input=${1}
if [[ -f ${input} ]]; then
# copy file
require 'openai'
# Comprueba si se proporciona un argumento de mensaje y, en caso contrario, solicita al usuario que proporcione uno.
if ARGV.empty?
puts "Please specify a message to send to the chatbot as an argument"
exit
end
# Combina los argumentos proporcionados en un único mensaje.
message = ARGV.join(" ")