Skip to content

Instantly share code, notes, and snippets.

version: '3.9'
services:
metabase-secrets:
image: metabase/metabase:latest
container_name: metabase-secrets
hostname: metabase-secrets
volumes:
- /dev/urandom:/dev/random:ro
ports:
- 3000:3000
@alkanna
alkanna / main.go
Last active January 18, 2021 11:12
import (
"os"
"regexp"
log "github.com/sirupsen/logrus"
)
type LogWriter struct{}
var levelRegex *regexp.Regexp
(function(t) {
function e(e) {
for (var i, o, r = e[0], l = e[1], c = e[2], u = 0, d = []; u < r.length; u++) o = r[u], a[o] && d.push(a[o][0]), a[o] = 0;
for (i in l) Object.prototype.hasOwnProperty.call(l, i) && (t[i] = l[i]);
m && m(e);
while (d.length) d.shift()();
return n.push.apply(n, c || []), s()
}
function s() {
package main
import (
"encoding/json"
"fmt"
)
func main() {
b := []byte(`{"key":"value"}`)
@alkanna
alkanna / request_no_curl.php
Created May 3, 2019 09:01 — forked from iNaD/request_no_curl.php
Sending a GET/POST Request via PHP without CURL (fopen needs to be enabled)
<?php
$url = 'http://server.com/path';
$data = array('key1' => 'value1', 'key2' => 'value2');
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
service ssh restart
awk 'NR==13 {$0="external_url \047http://192.168.99.107\047"} 1' /etc/gitlab/gitlab.rb > tmpfile && mv tmpfile /etc/gitlab/gitlab.rb
@alkanna
alkanna / ssh.sh
Last active March 20, 2019 20:12
service ssh restart
awk 'NR==13 {$0="external_url \047http://192.168.99.100\047"} 1' /etc/gitlab/gitlab.rb > tmpfile && mv tmpfile /etc/gitlab/gitlab.rb
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
upstream gitlab-workhorse {
server unix:/var/opt/gitlab/gitlab-workhorse/socket;
}
server {
listen *:80;
server_name _;
return 301 https://192.168.99.100$request_uri;
}
/opt/gitlab/embedded/bin/runsvdir-start&
EXTERNAL_URL="localhost" && gitlab-ctl reconfigure
tail -f /dev/null