Skip to content

Instantly share code, notes, and snippets.

@1v
1v / bestchange.user.js
Last active March 28, 2024 16:37
BestChange.ru - выделить избранные обменники
// ==UserScript==
// @name BestChange
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Highlights favorite exchanges
// @homepage https://gist.github.com/1v/fa3d41bf43c63d960e2b48dd8312e340
// @match https://www.bestchange.ru/*
// @match https://www.bestchange.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bestchange.ru
// @require https://code.jquery.com/jquery-3.7.1.min.js
@1v
1v / _README.md
Last active October 15, 2022 13:08
wsl letter_opener gem setup
bash <(curl -sL https://gist.githubusercontent.com/1v/b21da42500389725af260c0e51c9f2dd/raw/wsl.sh)

Add:

BROWSER: 'wslopen'

to application.yml

@1v
1v / gist:cf0a74bf10fbe7a8c2fbb04337f6cf45
Last active December 15, 2022 23:17
Start Rails server with WSL and Windows Terminal on launch

Add this to Windows Terminal settings (Settings -> Open JSON file) after launchMode for example:

"startupActions": "new-tab -p Ubuntu wsl -- source ~/.bash_profile \\; cd ~/www/rails-project \\; bin/rails s \\; $SHELL; new-tab -p Ubuntu wsl -- source ~/.bash_profile \\; cd ~/www/rails-project \\; bin/webpack-dev-server \\; $SHELL; new-tab -p Ubuntu wsl -- source ~/.bash_profile \\; cd ~/www/rails-project \\; $SHELL"

Explanation:

Start rails server. Tab will not be closed if server stopped by user, because of $SHELL. Using source ~/.bash_profile because rvm not loaded without it

@1v
1v / postgresql-backup-and-restore.md
Created October 6, 2022 22:24 — forked from mcandre/postgresql-backup-and-restore.md
PostgreSQL Backup and Restore

POSTGRESQL BACKUP AND RESTORE

$ pg_dumpall --clean -U <user> -f backup.sql
$ psql -U <user> -f backup.sql

Warnings

  • A PostgreSQL user with administrative privileges is required.
@1v
1v / README.markdown
Last active April 12, 2022 05:05
Bash script to run shutter on launch
cd ~/.local/bin
wget https://gist.github.com/1v/363393ebed0da5ed6f14678b6e031f21/raw/9c367b97565cc059f41ff95d9dc56db9085e13ca/shut-ter-auto-launch
chmod +x shut-ter-auto-launch

Add shut-ter-auto-launch to Startup Applications.

@1v
1v / rvm.markdown
Last active March 31, 2022 16:57
RVM installation
curl -L https://get.rvm.io | bash
source /home/user/.rvm/scripts/rvm
rvm autolibs fail

source

@1v
1v / squid_proxy_tutorial.md
Created November 8, 2021 01:09 — forked from jackblk/squid_proxy_tutorial.md
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils
@1v
1v / 1.markdown
Last active September 18, 2020 19:59

Act 1

  • Stormblast Mine

After Brut

  • Swift Assembly Support
  • Multiple Traps Support
  • Blastchain Mine Support
  • Flame Dash
  • Clarity
  • Added lightning damage

Tier 1

Good

  • Tropical Island
  • Glacier
  • Desert

Trash

  • Lookout

Tier 2

Good