A simple OpenCode Plugin to block access to .env files.
On Linux, save env-protection.ts to ~/.config/opencode/plugin/env-protection.ts.
import type { Plugin } from "@opencode-ai/plugin"| import json | |
| import requests | |
| class ClashAPI: | |
| def __init__(self, base_url, secret): | |
| self.base_url = base_url | |
| self.secret = secret | |
| self.headers = { |
Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.
Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).
But what if you don't have a second PC for setting up that USB storage drive in the first place?
In this tutorial we'll show you how you can set this up from a Mac.
You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "syscall" | |
| ) | |
| const ( |
| #!/bin/bash | |
| # Script to turn on fans, tested only for dell alienware 15 laptop | |
| # Works on Ubuntu 18.04, causes issues with other drivers on earlier verisons | |
| # Requires i8kutils, lm_sensors and fancontrol packages | |
| sudo modprobe dell-smm-hwmon force=1 | |
| sudo pwmconfig |
@ConfigurationProperties and always get state from the bean.Environment can change at runtime and Spring Cloud does this for you using RefreshEvent.@ConfigurationProperties and @RefreshScope).@ConfigurationProperties being consistent on concurrent access, put it or the consumer @Bean in @RefreshScope.| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |