A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Micro Frameworks
#!/bin/sh -eu | |
# A script to mirror a website using wget | |
usage() { | |
cat << EOF | |
Usage: $(basename "$0") [-w website] [-u user_agent] [-b] | |
Where: | |
-w The website to mirror. The website will be like "https://example.com/" | |
-u The User agent to use. If no User agent is specified, | |
a Firefox default one is used. |
В Nvim существует несколько плагинов, которые могут помочь вам форматировать код PHP. Вот некоторые из них:
php-cs-fixer
: Этот плагин был описан в предыдущем ответе и позволяет автоматически форматировать код согласно стандартам PHP.
Для настройки php-cs-fixer
в nvim, добавьте следующую строку в файл конфигурации:
lua
require('php-cs-fixer').setup()
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"os/signal" | |
"path" | |
"sync" | |
"syscall" |
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"strings" | |
) |
# IE is still braindead so still use favicon.ico | |
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico | |
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico | |
convert output-16x16.ico output-32x32.ico favicon.ico | |
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs | |
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32"> |
import gym | |
from gym.envs.registration import register | |
from gym import error, spaces, utils | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import pandas_datareader.data as web | |
import arrow | |
import random | |
import sys |
Docker Image : pytorch/pytorch | |
Image Runtype : jupyter_direc ssh_direc ssh_proxy | |
Environment : [["JUPYTER_DIR", "/"], ["-p 41654:41654", "1"]] | |
pip install torch bitsandbytes sentencepiece "protobuf<=3.20.2" git+https://github.com/huggingface/transformers flask python-dotenv Flask-HTTPAuth accelerate | |
!mv /opt/conda/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda116.so /opt/conda/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so |
The purpose of this short howto is to show you how to:
openconnect
[1] to connect to an enterprise cisco anyconnect endpointUsually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.
While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.