Skip to content

Instantly share code, notes, and snippets.

View huaigu's full-sized avatar

Alex Wang huaigu

View GitHub Profile
@dylanzan
dylanzan / Github中国大陆访问代理.txt
Last active January 18, 2024 13:45
github 中国大陆访问代理
GitHUB 访问代理:
软件功能简介:
· 域名纯净IP解析:提供无污染的域名解析服务,增强访问质量。
· IP测速与选择:自动测速并选择连接最快的IP地址。
· CDN资源替换:用于google CDN资源,解决部分国外网站的js和css加载问题。
· 非翻墙安全性:保持网络连接安全且干净,不记录用户信息。
Linux临时网络配置:
设置临时的HTTP和HTTPS代理(解决github releases,wget,curl等操作中可能出现的网络问题):
export https_proxy=http://git.iizone.com.cn:32222
export http_proxy=http://git.iizone.com.cn:32222
@nirewen
nirewen / erisPrototypes.js
Last active June 7, 2022 02:10
A list of helpful functions for my Eris bot
let Endpoints = require("eris/lib/rest/Endpoints");
Object.defineProperties(Eris.Client.prototype, {
fetchChannel: {
value: function(channelID) {
return this.requestHandler.request("GET", Endpoints.CHANNEL(channelID), true).then((channel) => {
if (channel.type === 0) {
return new Eris.TextChannel(channel, null, this.options.messageLimit);
} else if (channel.type === 1) {
return new Eris.PrivateChannel(channel, this);
} else if (channel.type === 2) {
@yas375
yas375 / MBProgressHUD+Additions.h
Created May 11, 2016 18:30
Migrating from SVProgressHUD to MBProgressHUD. We needed to expose `hasFinished` from MBProgressHUD's implementation and have added tests to make sure we remember about it when we upgrade MBProgressHUD. We didn't use Swift's default values and instead have added multiple `showStatus...` because we need to use it from Objective-C.
//
// MBProgressHUD+Additions.h
// Caremobile
//
// Created by Victor Ilyukevich on 4/13/16.
// Copyright © 2016 Care Zone Inc. All rights reserved.
//
@interface MBProgressHUD (Additions)
- (BOOL)hasFinished;
@mauron85
mauron85 / nginx-lang.lua
Last active September 3, 2023 06:31
Detect preferred language script for Nginx written in LUA
-------------------------------------------------------------------------------
-- HTTP Accept-Language header handler --
-- @originalAuthor: f.ghibellini@gmail.com --
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang--
-- @modifiedBy: marian.hello@mapilary.com --
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 --
-- @license: MIT --
-- @requires: --
-- @description: --
-- returns language with greatest quality --
@lemiorhan
lemiorhan / post-receive
Last active February 8, 2023 10:06
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then