Provider Free Storage
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
) |
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 | |
# Script that auto switches VSCode and Ubuntu themes to Dark or Light | |
# depending on time of day | |
# Copy this file to /usr/local/bin/my-auto-theme | |
# Add following lines to crontab -e | |
# 0 9 * * * bash /usr/bin/local/my-auto-theme light | |
# 0 17 * * * bash /usr/bin/local/my-auto-theme dark | |
# @reboot bash /usr/bin/local/my-auto-theme |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
) | |
var MyCustomError *ErrCustom | |
type ErrCustom struct{} |
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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"strings" | |
) |
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 | |
infile=$1 | |
if [[ -z $2 ]]; then | |
expsz_kb=120 | |
else | |
expsz_kb=$2 | |
fi | |
expsz=$((expsz_kb*1000)) | |
file_size=$(stat -c%s "$infile") |
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
package main | |
import "fmt" | |
type Iterator interface { | |
Next() interface{} | |
HasNext() bool | |
} | |
type Flower struct { |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"regexp" | |
) | |
func main() { | |
s := `time="2022-12-29T14:42:24Z" level=info msg="starting \"n=ew\" restore" logSource='pkg/co=ntroller/restore_controller.go:478' restore=velero/test-13` |
OlderNewer