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
| package model | |
| import ( | |
| "bytes" | |
| "crypto/tls" | |
| "crypto/x509" | |
| "encoding/base64" | |
| "encoding/json" | |
| "fmt" | |
| "github.com/mickael-kerjean/filestash-deploy/src/utils" |
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
| .PHONY: all build plugin clean | |
| all: build plugin | |
| build: | |
| go build -o wasm-http main.go | |
| plugin: | |
| cargo build --target wasm32-unknown-unknown --release | |
| cp target/wasm32-unknown-unknown/release/plugin.wasm . |
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
| :root { | |
| --color-box-shadow: rgba(0, 0, 0, 0.1); | |
| --header-font-size: 13px; | |
| --btn-size: 25px; | |
| --color-border: #d1d1d1; | |
| --color-primary: #2399f4; | |
| --co-border-radius: 4px; | |
| --color-main-background: #f5f5f5; | |
| --color-background-dark: #f5f5f5; | |
| --color-background-darker: #f5f5f5; |
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
| # 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 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
| #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 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
| #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 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://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 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
| 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 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
| (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 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
| 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 |
NewerOlder