- Create a VM instance (enable http & https)
Compute Engine > VM Instances - Configure static IP address
VPC Network > External IP Addresses - Create a DNS zone (with the domain name)
Network Services > Cloud DNS - Add a record set
blank name (and optionally www, api, etc.)
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 | |
mem_min=1 | |
mem_max=$((($(free -m | awk '/^Mem:/{print $2}')-128)/1024)) | |
mem=$(printf "%d" "$1") | |
if [ "$mem" -lt "$mem_min" ] | |
then mem=$mem_min | |
elif [ "$mem" -gt "$mem_max" ] | |
then mem=$mem_max | |
fi |
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
network={ | |
# ssid="public_network" | |
key_mgmt=NONE | |
} | |
network={ | |
# ssid="ms_bs_network" | |
key_mgmt=WPA-EAP | |
eap=PEAP | |
phase2="auth=MSCHAPV2" | |
# identity="username" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" /> | |
<meta name="description" content="Website description" /> | |
<title>Website</title> | |
<link rel="icon" href="./favicon.ico" /> | |
<link rel="manifest" href="./manifest.json" /> | |
<link rel="stylesheet" href="./main.css" /> |
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 | |
echo '## Operators' | |
"$@" help | awk ' | |
BEGIN { | |
doprint = 0 | |
} | |
/^\s*$/ { | |
doprint = 0 | |
} |
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
#[derive(Debug)] | |
struct Card(bool); | |
impl Card { | |
fn isCompatible(&self) -> bool { | |
self.0 | |
} | |
} | |
struct Vsinder { |
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 | |
# inspect codebase for occurances | |
keyword=$1 | |
shift | |
eval $( | |
grep "$keyword" "$@" -n | while read -r line | |
do | |
fl=${line%%:*} |
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 | |
[ -z "$1" ] && { | |
echo "error: specify file or directory" | |
exit 1 | |
} | |
files=$(find "$@" -type f) | |
exit_code=$?; [ $exit_code -ne 0 ] && exit $exit_code | |
name_width=20 |
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
create function generate_alphanum() returns char as $$ | |
select substring('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', trunc(random() * 36)::int + 1, 1) | |
$$ language sql; | |
create function generate_alpha() returns char as $$ | |
select chr((65 + trunc(random() * 26))::int) | |
$$ language sql; | |
create function generate_alphanum_string(len int) returns varchar as $$ | |
select array_to_string(array( |
OlderNewer