I set up the wiki page for the valet-wsl project and moved the install guide there. This way it can have user contributions. Please have all disscussions or issues under the valet-wsl project so I can be aware of it. Please go to Valet Wsl Installation Guide
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
<?php | |
// put in controller | |
$vendor_categories = $this->vendor_category_model->get_many_by('vendorid',$id); | |
// get the category the vendor belongs to | |
$vendorcat = array(); | |
foreach($vendor_categories as $vendor_category => $value){ | |
$vendorcat[$value->categoryid] = $value->categoryid; | |
} | |
//data array for view |
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
import axios from 'axios' | |
import toast from './toast' | |
function errorResponseHandler(error) { | |
// check for errorHandle config | |
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) { | |
return Promise.reject(error); | |
} | |
// if has response show the error |
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
ffmpeg -i movie.mov -vcodec copy -acodec copy out.mp4 |
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/sh | |
CRTPATH=$(pwd -W) | |
for i in *.key ; do | |
DOMAIN=${i%.key} | |
cat << EOF > openssl_$DOMAIN.conf | |
[req] | |
distinguished_name = req_distinguished_name | |
req_extensions = v3_req | |
prompt = no | |
[req_distinguished_name] |
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
$win_user = "ipc" | |
$linux_user = "ipc" | |
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
Add-MpPreference -ExclusionPath $base_path |
public class HelloContext
{
private ISomething _smh ;
void Foo(string key)
{
switch(key)
{
case "A":
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
// Creates a new promise that automatically resolves after some timeout: | |
Promise.delay = function (time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(resolve, time) | |
}) | |
} | |
// Throttle this promise to resolve no faster than the specified time: | |
Promise.prototype.takeAtLeast = function (time) { | |
return new Promise((resolve, reject) => { |
Updated: 2022-07
I wrote the first edition of this as a guide for myself at the end of 2017 - it was a mashup of Pi-Hole + PiVPN scripts and an IPsec script installed within a separate Raspian Docker image... and it actually worked!
But things have come a long way, and WireGuard happened - I've since streamlined and simplified my setup into a single Docker Compose script.
The steps below assume the following:
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/sh | |
# Copy the contents of this file to the clipboard, then get a terminal open on your device and enter: | |
# $ cat > n.sh | |
# [Ctrl+V] or Right Click, Paste. Then [Ctrl+D]. | |
# chmod +x n.sh | |
# To run: ./n.sh eth0 | |
SLP=1 # display / sleep interval | |
DEVICE=$1 | |
IS_GOOD=0 | |
for GOOD_DEVICE in `grep \: /proc/net/dev | awk -F: '{print $1}'`; do |
OlderNewer