Skip to content

Instantly share code, notes, and snippets.

View developer88's full-sized avatar

Andrey Eremin developer88

View GitHub Profile
@tomduckering
tomduckering / convertHL2ForAppleSilicon.sh
Last active April 6, 2025 03:49
HL2 on Apple Silicon
#!/bin/bash -x
TEMP_INSTALL_DIR="$HOME/SourceEngineGames/Half Life 2"
TEMP_CHECKOUT_DIR="/tmp/source-engine"
STEAM_INSTALL="$HOME/Library/Application Support/Steam/steamapps/common/Half-Life 2"
if ! test -d "$STEAM_INSTALL"; then
echo "Ensure you have HL2 installed - ensure it's the steam_legacy edition (Steam -> Library -> Half Life 2 -> Properties -> Betas -> Beta Participation"
echo "Did not find it installed at ${STEAM_INSTALL}"
exit 1
@warrenseine
warrenseine / docker-vz.yaml
Last active January 26, 2023 15:43
Lima configuration for macOS Ventura with Virtualization.framework + virtiofs + Docker
# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./docker.yaml
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
# $ docker ...
# Example to run ubuntu using vmType: vz instead of qemu (Default)
# This example requires Lima v0.14.0 or later and macOS 13.
@mroach
mroach / wee-slack-setup.sh
Created June 6, 2018 07:08
Setting-up wee-slack
# deps
pip2 install websocket-client
# weechat itself
brew install weechat --with-aspell --with-python@2
# wee-slack
mkdir -p ~/.weechat/python/autoload
curl -o ~/.weechat/python/autoload/wee_slack.py https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 18, 2025 13:48
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 19, 2025 13:21
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@k1r8r0wn
k1r8r0wn / devise.ru.yml
Last active December 10, 2024 11:05
Russian i18n locale for `Devise` gem
# Русский перевод для https://github.com/plataformatec/devise/tree/v4.7.1
# Другие переводы на https://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись успешно подтверждена."
send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: "Если ваш адрес email есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active November 10, 2024 20:52
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@maxivak
maxivak / readme.md
Last active February 19, 2025 23:23
Integrating Gem/Engine and Main Rails App
@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active April 19, 2025 04:39
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@vitorbritto
vitorbritto / rm_mysql.md
Last active April 6, 2025 09:16
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql