Skip to content

Instantly share code, notes, and snippets.

@mdisec
mdisec / gist:b0d44cc14e4c4c10cd64
Last active February 10, 2023 21:59
Kibana with Nginx Reverse Proxy + SSL + HTTP Auth
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:443/ instead of
# http://FQDN:9200

检查以下文件夹删除不需要的即可以

  • ~/Library/Logs/ (我全删了,没影响)
  • ~/Library/Caches/xxxxx(使用 DaisyDisk 找到容量比较大的删除. 不会对系统有影响)
  • ~/Library/Caches/com.spotify.client(全删, 正常工作)
  • ~/Library/Caches/Google/chrome (全删, 正常工作)
  • /Applications/Google Chrome/Contents/Versions/ (只保留最新的那个文件夹, 其他的删除, 正常工作)
  • ~/Library/Developer/Xcode/DerivedData/ (全删, 正常工作.)

工具:

  • DaisyDisk 使用试用版即可,可直观查看文件(夹)大小.
@germanviscuso
germanviscuso / alljoyn_pi
Last active July 25, 2017 13:03
Compile AllJoyn on the Raspberry Pi
INDEX
-----
- BUILD IT YOURSELF
- BUILD THE AUDIO SERVICE
- BUILDING FOR ANDROID
- INSTALL WITHOUT BUILDING
BUILD IT YOURSELF
-----------------
@snakevil
snakevil / howto-setup-transparent-proxied-router.md
Last active April 1, 2024 01:28
如何在路由器中实现透明代理?

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

.random-color {
border-top-color: "LightCoral";
border-right-color: #a44b58;
border-bottom-color: rgb(108, 188, 134);
border-left-color: rgb(24%, 88%, 5%);
outline-top-color: hsl(88, 69%, 69%);
outline-right-color: rgba(220, 71, 132, 0.69);
outline-bottom-color: rgba(79%, 47%, 14%, 0.37);
outline-left-color: hsla(111, 31%, 38%, 0.86);
}
@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active January 17, 2024 23:54
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@tmaiaroto
tmaiaroto / image-proxy.conf
Last active December 16, 2021 03:23
Nginx Image Filter Resize Proxy Service
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.
@hwdsl2
hwdsl2 / .MOVED.md
Last active May 4, 2024 03:19
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@jhjguxin
jhjguxin / mysql-status.md
Last active July 13, 2022 10:37
通过show status 来优化MySQL数据库 from lxneng
  1. 查看MySQL服务器配置信息
mysql> show variables;
  1. 查看MySQL服务器运行的各种状态值
mysql> show global status;

https://github.com/imcj/get-mirror

get-mirror

通过查询当前设备的IP地址,获得在物理位置上比较接近的镜像服务。

vagrant@vagrant:~$ echo $(get-mirror ubuntu)
cn.archive.ubuntu.com