Skip to content

Instantly share code, notes, and snippets.

View ifsc01's full-sized avatar
Focusing

ifsc01 ifsc01

Focusing
View GitHub Profile
@ifsc01
ifsc01 / main.go
Last active January 8, 2018 13:01
golang flag testing
package main
import (
"flag"
"log"
)
var addr = flag.String("addr", "api.huobi.pro", "http service address")
var tgToken = flag.String("tgToken", "", "telegram token")
var dsn = flag.String("dsn", "", "sentry dsn")
Surge Dashboard Task <86BA39AC-B7D5-43F1-8B0A-36544796F83B>.<34> finished with error - code: -1001
Surge Dashboard TIC TCP Conn Cancel [28:0x600000177dc0]
Surge Dashboard Task <86BA39AC-B7D5-43F1-8B0A-36544796F83B>.<34> HTTP load failed (error code: -999 [1:89])
Surge Dashboard TIC TCP Conn Destroyed [28:0x600000177dc0]
Surge Dashboard TIC Read Status [28:0x0]: 1:57
Surge Dashboard TIC Enabling TLS [29:0x60800017b480]
Surge Dashboard TIC TCP Conn Start [29:0x60800017b480]
Surge Dashboard Task <76E8FF06-60C4-4C09-AA91-E196DD5D95A8>.<35> setting up Connection 29
Surge Dashboard TIC TCP Conn Connected [29:0x60800017b480]: Err(16)
Surge Dashboard TIC TCP Conn Event [29:0x60800017b480]: 1
@ifsc01
ifsc01 / config.json
Last active March 29, 2018 02:33
v2ray socks5-tls config example
{
"log":{
"access":"/var/log/v2ray/access.log",
"error":"/var/log/v2ray/error.log",
"loglevel":"warning"
},
"inbound":{
"port":443,
"protocol":"socks",
"settings":{
use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# BooksWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don't forget to configure the url host to something meaningful,
# Phoenix uses this information when generating URLs.
use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# BooksWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don't forget to configure the url host to something meaningful,
# Phoenix uses this information when generating URLs.
use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# BooksWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don't forget to configure the url host to something meaningful,
{
"uid":"lidashuang",
"strategy":"Elixir.Ueberauth.Strategy.Gitlab",
"provider":"gitlab",
"info":{
"urls":{
"website_url":"",
"web_url":"https://git.3303033.com/lidashuang",
"avatar_url":"https://git.3303033.com/uploads/-/system/user/avatar/3/avatar.png"
},
defmodule CenterWeb.Router do
use CenterWeb, :router
require Ueberauth
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
- client = GameManager.get_client!(id)
+ client = GameManager.get_client!(id) |> Center.Repo.preload(:server_group)
+ # require IEx; IEx.pry
+ # Repo.all from s in Server, join: c in ServerGroupServer, where: c.server_group_id == 3 and c.server_id == s.id
+ # Repo.one from c in Client, where: c.id == 1, preload: [server_group: :servers]
use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# BooksWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don't forget to configure the url host to something meaningful,
# Phoenix uses this information when generating URLs.