-
Install the the
shadowsocks-libev
package from apt repository.sudo apt update sudo apt install shadowsocks-libev
-
Save
ss.json
as/etc/shadowsocks-libev/config.json
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To run this: | |
# bash <(curl -sL https://gist.githubusercontent.com/2shrestha22/b2f15066c1627085e0913ac52d243d62/raw/2c477da35d44b77a510783a1d1494cc90feb9217/magisk_flash.sh) | |
BOOT_IMAGE_FILE_NAME="boot.img" | |
BOOT_IMAGE_FILE_PATH="./$BOOT_IMAGE_FILE_NAME" | |
echo -e "Helper srcipt to flash Magisk patched boot.img for non A/B device...\n" | |
if adb shell getprop ro.build.ab_update | grep -q true; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "touchpad" | |
Driver "libinput" | |
MatchIsTouchpad "on" | |
Option "Tapping" "on" | |
Option "NaturalScrolling" "true" | |
EndSection |
Read the overview document first.
Lenovo laptop series using the ideapad_laptop
driver have a feature called
'battery conservation mode', basically a fixed stop charge threshold at 60%.
The hardware behaviour is:
- Connected to the charger, charging stops when the charge level reaches the stop threshold
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// by ResoCoder | |
// https://github.com/rrousselGit/freezed/issues/85#issuecomment-593908291 | |
{ | |
"Part statement": { | |
"prefix": "pts", | |
"body": [ | |
"part '${TM_FILENAME_BASE}.g.dart';", | |
], | |
"description": "Creates a filled-in part statement" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/snippets/wp.conf | |
# include inside server block | |
index index.php; | |
location / { | |
# try to serve static file if not found then directory then php | |
# include the "?$args" part so non-default permalinks doesn't break when usi> | |
try_files $uri $uri/ /index.php?$args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/snippets/wordpress/common.conf | |
index index.php; | |
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac). | |
location ~ /\. { | |
deny all; | |
} | |
# Block PHP files in uploads, content, and includes directory. | |
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ { |
Hi there! Since this post was originally written, nvm
has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!
Trickier than it seems.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//where _kAdIndex is an int and after each -kAdIndex in the listView Ad is displayed | |
ListView.builder( | |
controller: _scrollController, | |
cacheExtent: 20, | |
itemCount: data.layoutList.length + | |
(data.layoutList.length ~/ _kAdIndex), | |
itemBuilder: (BuildContext context, int index) { | |
if (index != 0 && (index + 1) % (_kAdIndex + 1) == 0) { | |
print(index); |
NewerOlder