Skip to content

Instantly share code, notes, and snippets.

View galulex's full-sized avatar
🇺🇦
¯\_(ツ)_/¯

Alex Galushka galulex

🇺🇦
¯\_(ツ)_/¯
View GitHub Profile
@galulex
galulex / specs.md
Last active November 17, 2025 10:17
Tesla frunk button

Потрібно зробити кнопку для всіх тесла для відкриття переднього багажнику

Приклад є на відео: https://www.youtube.com/watch?v=1IiNR54dGCA

Проблема в тому що як зображено на відео там потрібно прокладати провід і розбирати теслу

Натомість потрбіно зробити 3д друковану деталь з різьбою як на буксировочному гачку з жолобком для батарейки А23 і прорізами для контактів і гнучкою поверхньою щою можна було натиснути і замкнути контакти на батарейці

Такого ще ніхто не робив тому потрібно змоделювати 3д модель вланоруч

AB emails setup

  1. Go to your Gmail Settings -> Accounts and Import
  2. Send email as: Add another email address
  3. Enter your Name and Email
image
  1. Enter SMTP details:
  • SMTP Server: smtp.gmail.com
  • Username: You own gmail
@galulex
galulex / feature.rb
Created September 13, 2023 06:28
Rspec/Cabybara samples
RSpec.feature 'Trip', type: :feature, js: true do
let!(:user) { create(:user) }
let!(:work) { FavoriteAddress.create(user: user, name: 'Work', location: '49.426269,32.05418899999995', address: 'Active Bridge') }
let!(:home) { FavoriteAddress.create(user: user, name: 'Home', location: '49.44546829999999,32.071774000000005', address: 'Haharina, 55') }
let!(:card) { create(:card, user: user) }
let!(:car) { create(:car) }
let!(:driver) { create(:driver, car: car) }
let!(:price) { Price.delete_all && Price.create }
let!(:prev_trip) { user.trips.create(status: 'finished') }
let(:trip) { Trip.last }
@galulex
galulex / Readme.md
Last active August 30, 2023 13:00
Neovide config

Installation

 git clone https://github.com/galulex/vim.git ~/.vim
 mkdir ~/.fonts
 cd ~/.fonts && curl -fLo DroidSansMonoForPowerlinePlusNerdFileTypes.otf https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete%20Mono.otf?raw=true

 ln -s  ~/.vim/.vimrc ~/.vimrc
 sudo apt-get install ctags wmctrl fonts-powerline

M1 Mac

@galulex
galulex / counties.js
Created March 13, 2023 15:00
US Counties
[
{
"value": "Autauga County",
"label": "Autauga County",
"state": "AL"
},
{
"value": "Baldwin County",
"label": "Baldwin County",
"state": "AL"
@galulex
galulex / sw.js
Created February 11, 2021 08:55
ServiceWorker.js
// This is the "Offline page" service worker
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.0.0/workbox-sw.js');
const CACHE = "pwabuilder-page";
// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html";
const offlineFallbackPage = "offline.html";
self.addEventListener("message", (event) => {
  • Introduction
  • Why ROR?
  • React/Redux
  • What do you like about React
  • What is Redux?

Ruby

  • What is a class?
  • What is the difference between a class and a module?
@galulex
galulex / example.js
Created August 22, 2018 09:46
React Code sample
import React, { Component } from 'react'
import {
Platform,
AsyncStorage,
Alert,
Modal,
TextInput,
TouchableOpacity,
Keyboard
} from 'react-native'
@galulex
galulex / task.txt
Created April 15, 2017 10:47
Premium
Summary
We are a local home cleaning company called Homework. Today we are keeping track of all our bookings using a spreadsheet and we want to move it into a web application instead using Ruby on Rails. Our main goal with this project is to make it possible for customers to schedule a booking online. I've already created the scaffolding of the app for you and now I need you to add some functionality to it. This should take you about 1-2 hours, but you have up to 4 hours to complete it.
Deliverables
All models and columns should have validation as described in the model spec below.
Currently we operate in 10 cities, but plan to expand quickly. We need a way to store the list of cities we operate in and the ability to add to the list. You should create a new table to do this.
On the Cleaner Form we need a way to select the cities a cleaner works in. This should be a checkbox list populated by the list of cities we operate in. You may need to need to create a new table to store this data.
We need a way for cus
@galulex
galulex / zoom.js
Last active August 29, 2015 14:25
zoom
$(document).on('mousemove', '.zoom', function (e){
var rect = e.target.getBoundingClientRect(),
offsetX = e.clientX - rect.left,
offsetY = e.clientY - rect.top;
x = offsetX/this.offsetWidth*100
y = offsetY/this.offsetHeight*100
this.style.backgroundPosition = x + '% ' + y + '%';
})