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
# Add Dell GPG key to apt | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 1285491434D8786F | |
echo "deb http://linux.dell.com/repo/community/openmanage/930/bionic bionic main" > /etc/apt/sources.list.d/linux.dell.com.sources.list | |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-curl-client-transport1_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-client4_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman1_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-server1_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfcc/libcimcclient0_2.2.8-0ubuntu2_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/openwsman_2.6.5-0ubuntu3_amd64.deb |
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
#include <stdio.h> | |
#include "image_png.h" | |
// gcc -o main.bin main.c image_png.c -lwebp -lpng | |
int main(int argc, char **argv) { | |
FILE* input = fopen("/home/mickael/Downloads/tmp/test.png", "rb"); | |
FILE* output = fopen("/home/mickael/Downloads/tmp/test_c.webp", "wb"); | |
return png_to_webp(fileno(input), fileno(output), 250); | |
} |
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
#include <string.h> | |
#include <png.h> | |
#include <stdlib.h> | |
#include "webp/encode.h" | |
#include "utils.h" | |
static int filestash_png_writer(const uint8_t* data, size_t data_size, const WebPPicture* const pic) { | |
FILE* const out = (FILE*)pic->custom_ptr; | |
return data_size ? (fwrite(data, data_size, 1, out) == 1) : 1; | |
} |
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
https://qantas-qfa-dummy.s3.ca-central-1.amazonaws.com/swagger-ui/index.html | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", |
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
aws s3 ls qantas-qfa-dummy/specs/ > /tmp/tmp.dat | |
cat /tmp/tmp.dat | sed 1d | awk '{printf $1"."$4"\n"}' | awk -F "." 'BEGIN{print "<style>a{text-decoration:none;font-family:monospace;font-size:1rem;}</style>"} {printf("<a href=\"%s.%s\">%s %s</a><hr>\n",$2,$3,$1, $2)}' |
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
(require 'hydra) | |
(defun my/browser-open-at-point (&optional arg) | |
(interactive "P") | |
(let ((url (thing-at-point 'url))) | |
(xwidget-webkit-browse-url | |
(if url url (read-string "url: " ""))))) | |
(defun my/browser-google (&optional arg) | |
(interactive "P") |
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
export PS1="\[\033[1;34m\]\w\[\033[0;37m\] # \[\033[0m\]" | |
# https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/ | |
# create relevant images and push them | |
docker build -t machines/filestash:latest-arm64v8 . | |
docker push machines/filestash:latest-arm64v8 | |
docker build -t machines/filestash:latest-amd64 . | |
docker push machines/filestash:latest-amd64 |
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 | |
set -e | |
# run like this: | |
# /bin/bash -c "$(curl -fsSL https://xxx)" | |
VERSION=1.27 | |
######################## | |
# docker stuff: https://kubernetes.io/docs/setup/production-environment/container-runtimes/ |
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
/* | |
* Build steps: | |
* 1. go generate -x ./index.go | |
* 2. go build -o sftp.bin index.go | |
*/ | |
package main | |
import ( | |
_ "embed" | |
"fmt" |
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
// go mod init example.com && go get . | |
// CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o webdav.bin main.go | |
package main | |
import ( | |
"fmt" | |
"github.com/google/go-webdav" | |
"github.com/google/go-webdav/memfs" | |
"net/http" |
NewerOlder