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
cmake_minimum_required(VERSION 3.11) | |
project(out.js) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_FLAGS "-Wall -target cheerp") | |
set(CMAKE_CXX_COMPILER "/Applications/cheerp/bin/clang++") | |
set(CMAKE_LINKER "/Applications/cheerp/bin/llvm-link") | |
set(CMAKE_AR "/Applications/cheerp/bin/llvm-ar") | |
set(CMAKE_NM "/Applications/cheerp/bin/llvm-nm") | |
set(CMAKE_OBJDUMP "/Applications/cheerp/bin/llvm-objdump") |
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
extern crate html5ever; | |
use html5ever::{ParseOpts, parse_document}; | |
use html5ever::tree_builder::TreeBuilderOpts; | |
use html5ever::rcdom::RcDom; | |
use html5ever::rcdom::NodeEnum::Element; | |
use html5ever::serialize::{SerializeOpts, serialize}; | |
use html5ever::tendril::TendrilSink; | |
fn main() { |
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
ffmpeg -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero -i music.mp3 -vcodec libx264 -preset medium -tune stillimage -crf 24 -acodec copy -shortest output.mkv |
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
pub fn main() { | |
struct Lel { | |
ch: char, | |
num: u64 | |
} | |
struct Yip { | |
lel: Lel, | |
b: bool | |
} |
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
async def print_async(*args): | |
print(*args) | |
def p(*args): | |
asyncio.run(print_async(*args)) | |
p('It works') | |
p('Still works') |
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
FROM golang as base | |
RUN mkdir /app | |
ADD . /app/ | |
WORKDIR /app | |
RUN go get -u "github.com/gin-gonic/gin" | |
RUN go get -u "github.com/lib/pq" | |
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-w -s -extldflags -static" -o main . |
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
#!/bin/sh | |
apt-get update \ | |
&& apt-get install -qy docker.io | |
apt-get update && apt-get install -y apt-transport-https \ | |
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list | |
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
FROM liuchong/rustup:musl AS base | |
RUN mkdir app | |
WORKDIR ./app | |
COPY ./Cargo.lock ./Cargo.lock | |
COPY ./Cargo.toml ./Cargo.toml | |
RUN rustup target add x86_64-unknown-linux-musl | |
RUN rustup install nightly | |
RUN cargo install cargo-build-deps --verbose --color always |
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
func split(buf []byte, lim int) [][]byte { | |
var chunk []byte | |
chunks := make([][]byte, 0, len(buf)/lim+1) | |
for len(buf) >= lim { | |
chunk, buf = buf[:lim], buf[lim:] | |
chunks = append(chunks, chunk) | |
} | |
if len(buf) > 0 { | |
chunks = append(chunks, buf[:len(buf)]) | |
} |
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
http://www.youtube.com/watch?v=-wtIMTCHWuI | |
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1 | |
http://youtu.be/-wtIMTCHWuI | |
http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-wtIMTCHWuI&format=json | |
http://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DEhxJLojIE_o%26feature%3Dshare |