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
package main | |
import ( | |
"image" | |
"image/color" | |
"image/draw" | |
"image/png" | |
"math" | |
"os" | |
) |
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
FROM golang:1.16.6-alpine | |
WORKDIR /go/src/app | |
COPY main.go go.mod /go/src/app/ | |
RUN go build | |
FROM alpine:latest | |
EXPOSE 8080 | |
RUN apk --no-cache add ca-certificates | |
WORKDIR /root/ | |
COPY --from=0 /go/src/app/app ./ |
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
Windows Registry Editor Version 5.00 | |
; TODO before adding to registry : Replace C:\\Program Files\\chrome\\bin\\chrome.exe with the path to your chromium exe | |
; double \ in the path | |
; after double click on reg file for adding to registry | |
; after : go into windows default program parameters and set Chromimum as default | |
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications] | |
"Chromium"="Software\\Clients\\StartMenuInternet\\Chromium\\Capabilities" |
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
package main | |
import ( | |
"bytes" | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"crypto/rand" | |
"fmt" | |
"io" | |
"regexp" |
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
INDUSTRIAL SOCIETY AND ITS FUTURE | |
Introduction | |
1. The Industrial Revolution and its consequences have been a disaster for the | |
human race. They have greatly increased the life-expectancy of those of us | |
who live in “advanced” countries, but they have destabilized society, have | |
made life unfulfilling, have subjected human beings to indignities, have led | |
to widespread psychological suffering (in the Third World to physical | |
suffering as well) and have inflicted severe damage on the natural world. The |
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
-s -O2 -fno-ident -ffunction-sections -Wl,--gc-sections -fno-stack-protector -fno-stack-check -s | |
-flto -s -O2 -fno-ident -ffunction-sections -Wl,--gc-sections -fno-stack-protector -fno-stack-check -s | |
https://github.com/svaarala/duktape/blob/master/doc/low-memory.rst#optimizing-code-footprint |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"os" | |
"github.com/jung-kurt/gofpdf" |
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> | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
typedef enum | |
{ | |
Tile, | |
Center, | |
Stretch, | |
Fit, | |
Fill |
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
typedef struct | |
{ | |
size_t size, cap; | |
char *data; | |
} Buffer; | |
static size_t next_power_of_two(size_t v) | |
{ | |
v--; |
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
/* | |
// gcc -s -O3 -std=c99 -Wall -o cam cam.c -lvfw32 | |
#include <stdio.h> | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
#include "cam.h" | |
int main(void) | |
{ | |
long w = 1280; |