This file contains hidden or 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
send_email() { | |
# sendgrid api key | |
API_KEY=$mykey | |
to=$1 | |
from=$2 | |
subject=$3 | |
content=$4 | |
JSON_FORMAT='{"personalizations": [{"to": [{"email": "%s"}]}],"from": {"email": "%s"},"subject": "%s","content": [{"type": "text/plain", "value": "%s"}]}\n' | |
data=$(printf "$JSON_FMT" "$to" "$from" "$subject" "$content") | |
curl --request POST \ |
This file contains hidden or 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
.tracks[]|"wget `curl -H 'appvers: 1.0.15.10102924' -H 'baseapi: 23' -H 'basever: 1.0.15.10102924' -H 'beta: 0' -H 'channel: 0' -H 'channelid: 0' -H 'osver: 10.0.1' -H 'skey: pZw4DtHy' -H 'user-agent: Whear/1.0.15 WHBrand/xiaomi Dalvid/2.1.0 (Linux; U; Android 10.0.1; Redmi Note 8 Build/MRA58K)' -H 'vid: 2319074' -H 'wrts_listentime: 0' -H 'wrts_signature: 1623431083_1621078395_eeabecbf444e0e50fcdb7f' 'https://i.at.qq.com/getplayinfo?trackId=" + .trackId + "&type=0&model='|jq -r '.url'` -O " + .title + ".m4a" |
This file contains hidden or 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
#!/usr/bin/perl | |
#Filename: FlashVideoCapture.pl | |
use strict; | |
################################################## | |
# Setup the variables | |
################################################## | |
my $PROGNAME = $0; $PROGNAME =~ s|.*/||; | |
my $LSOF = 'lsof'; |
This file contains hidden or 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
<!-- https://pretagteam.com/question/html5-display-audio-currenttime --> | |
<div> | |
<audio id="track" src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" ontimeupdate="document.getElementById('tracktime').innerHTML = this.currentTime.toFixed(2) + ' / ' + this.duration.toFixed(2);" controls="controls"> | |
<p>Your browser does not support the audio element</p> | |
</audio> | |
<span id="tracktime">0 / 0</span> | |
</div> | |
<div> |
This file contains hidden or 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
class Array | |
def bubble_sort! | |
sorted = false | |
while !sorted | |
sorted = true | |
(0...self.length - 1).each do |index| | |
comparison = if block_given? | |
yield self[index], self[index+1] | |
else | |
self[index] > self[index + 1] |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="description" content="grab bandwidth from Network Information."> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Network Information</title> | |
<style> |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongo | |
labels: | |
name: mongo | |
spec: | |
ports: | |
- port: 27017 | |
targetPort: 27017 |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: mongo | |
spec: | |
selector: | |
matchLabels: | |
role: mongo | |
environment: production | |
serviceName: "mongo" |
This file contains hidden or 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
# debugger.yaml | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: toolkit | |
spec: | |
volumes: | |
- name: volume-to-debug | |
persistentVolumeClaim: | |
claimName: postgres-data-0 |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: pgpool | |
labels: | |
app: pgpool | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |