Skip to content

Instantly share code, notes, and snippets.

View raulintosh's full-sized avatar

Raul Giucich raulintosh

View GitHub Profile
@raulintosh
raulintosh / tensorflow
Created March 20, 2023 20:09
tensorflow
docker pull tensorflow/tensorflow:latest # Download latest stable image
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter # Start Jupyter server
@raulintosh
raulintosh / reducir_imagenes_rango_fecha
Last active January 27, 2023 18:21
reducir imagenes por rango de fecha
1. Instalar ImageMagick
2. Ir al directorio donde están las imagenes
3. find ./ -newermt 2019-01-01 ! -newermt 2022-12-31 -name "*.jpg" -type f \( -iname "*.jpg" ! -iname "*'*" \) -exec echo mogrify -resize 50% {} \; > /root/mogrify.txt
3a Busca todos los archivos jpg que no contengan un ' en el nombre entre el 2019-01-01 y el 2022-12-31, reduce las imagenes un 50%
4. Copiar el archivo generado mogrify.txt al directorio de las imagenes
5. Agregarle #!/bin/sh en la primera línea al archivo
6. Ponerle los permisos de ejecución
7. Ejecutar
WITH transaction AS (
SELECT transaction_id,
customer_id,
state,
amount_spent_usd
FROM FACT_TABLE_TRANSACTION
),
customer_spend AS (
SELECT customer_id,
state,
@raulintosh
raulintosh / mail.md
Created July 21, 2020 20:41
mail de momo
@raulintosh
raulintosh / form_liveview_inicio
Last active June 4, 2020 16:19
Formulario de inicio phoenix liveview
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1>
<p>Peace-of-mind from prototype to production</p>
<form phx-change="suggest" phx-submit="search">
<input type="text" name="q" value="<%= @query %>" placeholder="Live dependency search" list="results" autocomplete="off"/>
<datalist id="results">
<%= for {app, _vsn} <- @results do %>
<option value="<%= app %>"><%= app %></option>
<% end %>
</datalist>
@raulintosh
raulintosh / osm2pgsql
Last active May 12, 2020 15:00
importar base de datos de openstreetmaps
osm2pgsql south-america-latest.osm.pbf -d momotree -U rgiucich -W --hstore -C 7000 -E 4326
@raulintosh
raulintosh / cambio_pass_momo
Last active August 23, 2021 20:35
cambio de password de un user de momo
$user = App\Models\Auth\User::whereUsername('admin_momo')->first();
$user->password = \Hash::make('zxcv$1973');
$user->save();
$user = App\Models\Auth\User::whereUsername('admin_momo')->first();
$user->password = \Hash::make('Nuevatel$123');
$user->save();
$user = App\Models\Auth\User::whereUsername('ivan.ninodeguzman@nuevatel.com')->first();
$user->password = \Hash::make('Nuevatel2121');