Skip to content

Instantly share code, notes, and snippets.

View dreikanter's full-sized avatar

Alex Musayev dreikanter

View GitHub Profile
@romanhaa
romanhaa / run.sh
Last active January 1, 2024 06:19
macOS settings
# https://macos-defaults.com/
# https://www.defaults-write.com
# reset with: defaults delete -g <FEATURE>
# dock
# position
defaults write com.apple.dock "orientation" -string "right"
# icon size
defaults write com.apple.dock "tilesize" -int "36"
@motine
motine / cleanup_job.rb
Last active April 22, 2021 16:45
Simple Rails Monitoring
# services/monitoring/cleanup_service.rb
class Monitoring::CleanupService
def self.run
Monitoring::Measurement.where("recorded_at < ?", 3.months.ago).delete_all
end
end
# let this service run nightly
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 8, 2024 03:04
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@glukki
glukki / README.md
Created October 16, 2020 13:49
Bash scripts starter pack

Онбординг фронтендера на Амплифере

Дать доступ. Менеджер и Макс даёт доступ. Фронтовый тимлид пинает их, уточняет у нового фронтендера дали ли ему все доступы, пинаем ещё раз, если надо.

  1. Выдать почту на @amplifr.com
  2. Доступ в Slack
  3. Доступ в Trello
  4. Доступ в GitHub
  5. Доступ в Zeplin
  6. Доступ в Sentry

Принципы разработки Амплифера

Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.

Ценности

  1. Пользователь. Если что-то сильно мешает UX или есть критическая ошибка, то в первую очередь мы спасаем пользователей. Для этого иногда надо взять ответственность на себя, переубедить толпу, написать плохой код.
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@ipepe
ipepe / install-chrome-headless.sh
Last active April 4, 2024 00:32
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
@cocoalabs
cocoalabs / gist:2fb7dc2199b0d4bf160364b8e557eb66
Created August 15, 2016 21:50
Color Terminal for bash/zsh etc..
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 14, 2024 11:40
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###