Skip to content

Instantly share code, notes, and snippets.

@xofred
xofred / GitConfigHttpProxy.md
Created Oct 27, 2020 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy
View GitConfigHttpProxy.md

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@xofred
xofred / force_bot.rb
Last active Sep 1, 2020
Auto generate factory_bot model definition on legacy project
View force_bot.rb
# Solve https://github.com/thoughtbot/factory_bot_rails/issues/63
# Original credit https://stackoverflow.com/a/50319158/2180787
# If you use Rails and see the following error:
# Could not find generator 'factory_bot:model'. Maybe you meant 'test_unit:model', 'active_record:model' or 'rspec:model'
# Run `rails generate --help` for more options.
#
# Make sure factory_bot_rails is in the Gemfile relative enviroment group, such as development, test
#
#group :development, :test do
@xofred
xofred / surge.conf
Created May 15, 2017 — forked from blackgear/surge.conf
Surge config for new user
View surge.conf
[General]
loglevel = warning
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.lan
bypass-tun = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
dns-server = 114.114.114.114,114.114.115.115
[Proxy]
PROXY = custom,服务器地址,服务器端口,加密方式,密码,模块地址,tcp-fast-open=true
You can’t perform that action at this time.