Configure environment variable
export DATABASE_URL=postgres://postgres@localhost/dbname?sslmode=disable
Run in CLI
go run main.go -page 1
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"os" | |
"strings" | |
) |
::_10:: io.write(math.random() < 0.5 and "/" or "\\"); goto _10 |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) |
// Compile like this: g++ fullauto.cpp --std=c++17 -o fullauto | |
// Run like this: sudo fullauto & | |
#include <thread> | |
#include <chrono> | |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <vector> |
package strarray | |
import ( | |
"encoding/json" | |
"errors" | |
) | |
var ( | |
// ErrUnsupportedType is returned if the type is not implemented | |
ErrUnsupportedType = errors.New("unsupported type") |
#!/bin/bash | |
## Update Golang (Linux/Mac) | |
go version | |
## Get Last Stable Version | |
LAST_VERSION=$(curl -s 'https://go.dev/VERSION?m=text'|head -n1) | |
os="linux" | |
if [ "$(uname -s)" = "Darwin" ]; then |
Configure environment variable
export DATABASE_URL=postgres://postgres@localhost/dbname?sslmode=disable
Run in CLI
go run main.go -page 1
import json | |
def json_titles_tuple(payload_json, prefix=''): | |
jsonobj = json.loads(payload_json) | |
titles = () | |
for key, value in jsonobj.items(): | |
if isinstance(value, dict): | |
titles += json_titles_tuple(json.dumps(value), prefix + key + '_') | |
else: | |
titles += (prefix + key,) |
package main | |
import ( | |
"context" | |
"log" | |
"github.com/chromedp/chromedp" | |
) | |
func main() { |
package main | |
import ( | |
"fmt" | |
"net" | |
"net/http" | |
"github.com/gorilla/mux" | |
) |