Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| import re | |
| from django.conf import settings | |
| from django.core import cache as django_cache | |
| from mock import patch | |
| from rest_framework.permissions import SAFE_METHODS | |
| from rest_framework.response import Response | |
| class CachedResourceMixin (object): | |
| @property |
TL;DR
Create a backup:
pg_dumpall > mybackup.sqlPerform the upgrade:
sudo pg_dropcluster 9.4 main --stop由于路由管控系统的建立,实时动态黑洞路由已成为最有效的封锁手段,TCP连接重置和DNS污染成为次要手段,利用漏洞的穿墙方法已不再具有普遍意义。对此应对方法是多样化协议的VPN来抵抗识别。这里介绍一种太简单、有时很朴素的“穷人VPN”。
朴素VPN只需要一次内核配置(Linux内核),即可永久稳定运行,不需要任何用户态守护进程。所有流量转换和加密全部由内核完成,原生性能,开销几乎没有。静态配置,避免动态握手和参数协商产生指纹特征导致被识别。并且支持NAT,移动的内网用户可以使用此方法。支持广泛,基于L2TPv3标准,Linux内核3.2+都有支持,其他操作系统原则上也能支持。但有两个局限:需要root权限;一个隧道只支持一个用户。
朴素VPN利用UDP封装的静态L2TP隧道实现VPN,内核XFRM实现静态IPsec。实际上IP-in-IP隧道即可实现VPN,但是这种协议无法穿越NAT,因此必须利用UDP封装。内核3.18将支持Foo-over-UDP,在UDP里面直接封装IP,与静态的L2TP-over-UDP很类似。
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` or `git checkout` if a specified file was changed | |
| # Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" |
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q - quitSPC w / - split window verticallySPC w - - split window horizontallySPC 1 - switch to window 1SPC 2 - switch to window 2SPC w c - delete current windowThis setup allows you to start a single Sway remote desktop session on a virtual display directly from Moonlight by sending the Wake PC request, waiting a few seconds and connecting to a fresh new desktop. Or you can just have a desktop running constantly in the background. This requires no dummy plugs or input devices attached to the host, but will also allow you to sometimes log in locally and and have that session available on sunshine too. Some of this stuff probably also works with other wlroots-based compositors with small changes.
I'm assuming you've first read and memorized the Sunshine documentation, it probably includes some very important stuff I didn't put here. The stuff about udev rules is probably important, cap_sys_admin not so much.
Here's a simpler thing to just use on demand custom r