- Install prettier
- Make a .prettierignore file, and add directories you'd like prettier to not format, for example:
**/node_modules
- Run
prettier --write "**/*.js"
*Don't forget the quotes. - Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
Update: use PowerShell script PythonEmbed4Win.ps1.
The instructions in this gist have some subtle problems and this gist will not be updated.
Make sure the if
value is correct! If doing this over SSH then open a TMUX session first... or else...
dd if=/dev/YOUR-DEVICE conv=sync,noerror bs=64K | gzip -c > /home/portaj/macbook.img.gz
NOTE: You might not want to compress the image. It just means you have to uncompress it later to mount it. If you're planning to access the data soon, or frequently, don't compress it.
Save it in the same directory as the compressed image so later on if you decide you want to mount or extract data from the image you can see the partition structure without having to decompress the whole image. There might be some other ways to mount a compressed image.
{//服务器使用的方案:VLESS+TLS+WS+NGINX+CDN,看情况替换成自己的 | |
"log": { | |
"access": "/dev/null", | |
"error": "/var/log/xray_error.log", | |
"loglevel": "warning" | |
}, | |
"inbounds": [ | |
{ | |
"tag":"transparent", | |
"port": 12345, |
The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.
It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.
Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.
/* bookmarks are stored in “/data/data/org.mozilla.firefox/files/mozilla/…….default/browser.db” */ | |
SELECT url, created | |
FROM bookmarks | |
WHERE COALESCE(url, '') <> '' | |
ORDER BY created ASC |
https://code.google.com/p/android/issues/detail?id=32696#c5 | |
If you have a certificate that is not | |
trusted by Android, when you add it, it goes in the personal cert store. | |
When you add a cert in this personal cert store, the system requires a | |
higher security level to unlock the device. But if you manage to add your | |
cert to the system store then you don't have this requirement. Obviously, | |
root is required to add a certificate to the system store, but it is quiet | |
easy. |
;;; The Y Combinator explained in scheme. | |
;;; with credits to: | |
;;; https://mvanier.livejournal.com/2897.html | |
;;; Status: WIP | |
(define fibonacci | |
(lambda (n) | |
(cond ((= n 0) 0) | |
((= n 1) 1) | |
(else (+ (fibonacci (- n 1)) (fibonacci (- n 2))))))) |
I frequently administer remote servers over SSH, and need to copy data to my clipboard. If the text I want to copy all fits on one screen, then I simply select it with my mouse and press CMD-C, which asks relies on m y terminal emulator (xterm2) to throw it to the clipboard.
This isn't practical for larger texts, like when I want to copy the whole contents of a file.
If I had been editing large-file.txt
locally, I could easily copy its contents by using the pbcopy
command:
#!/bin/bash | |
#Simple Firewall Script. | |
#Add "pre-up iptables-restore < /etc/iptables.rules" to /etc/network/interfaces | |
#Setting up default kernel tunings here (don't worry too much about these right now, they are acceptable defaults) #DROP ICMP echo-requests sent to broadcast/multi-cast addresses. | |
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts | |
#DROP source routed packets | |
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route | |
#Enable TCP SYN cookies | |
echo 1 > /proc/sys/net/ipv4/tcp_syncookies |