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/bash | |
| docker run --rm -v $PWD:/a -w /a buildpack-deps:buster cc bench_pc.c $* | |
| time docker run --rm -v $PWD:/a debian:buster-slim /a/a.out | |
| time docker run --rm -v $PWD:/a --privileged debian:buster-slim /a/a.out |
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
| #!/usr/bin/env bash | |
| # how to find the token: https://docs.uptobox.com/?javascript#how-to-find-my-api-token | |
| token= | |
| dl() | |
| { | |
| file_code=$1 | |
| file_code=${file_code##https://uptobox.com/} |
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://nginx.org/en/docs/http/ngx_http_autoindex_module.html | |
| autoindex on; |
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
| #! /usr/bin/env python3 | |
| """ | |
| télécharge les exemples de https://edupython.tuxfamily.org | |
| """ | |
| import requests | |
| import re | |
| import pathlib | |
| # import black |
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.7) | |
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
| set(CMAKE_VERBOSE_MAKEFILE ON) | |
| string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type) | |
| message("AAA CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE} ${cmake_build_type}") | |
| if (cmake_build_type STREQUAL "debug") |
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 alpine AS builder | |
| RUN apk add gcc musl-dev glib-static glib-dev upx | |
| COPY a.c / | |
| RUN gcc a.c `pkg-config --cflags --libs glib-2.0` -static \ | |
| && strip a.out \ | |
| && upx -q a.out || true | |
| FROM scratch | |
| COPY --from=builder /a.out / | |
| ENTRYPOINT ["/a.out"] |
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
| # Docker image downloader | |
| # download Docker images without Docker installed | |
| FROM docker:edge | |
| RUN apk add --no-cache bash curl ca-certificates jq go | |
| ADD https://raw.githubusercontent.com/moby/moby/master/contrib/download-frozen-image-v2.sh /bin/download-frozen-image |
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
| // démonstration emplace c++11 vs. c++17 | |
| // rene-d 2019 | |
| //#include <bits/stdc++.h> | |
| #include <iostream> | |
| #include <vector> | |
| #include <unordered_map> | |
| using namespace std; | |
| struct toto |
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
| #! /usr/bin/env python3 | |
| """ | |
| set file atime and ctime based on the date pattern YYYY[_-]MM[_-]DD in filename | |
| """ | |
| import argparse | |
| import re | |
| import os | |
| import datetime |
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/bash | |
| useage() { | |
| printf "\n\e[1;4mAscii Escape Code Helper Utility\e[m\n\n" | |
| printf " \e[1mUseage:\e[m colors.sh [-|-b|-f|-bq|-fq|-?|?] [start] [end] [step]\n\n" | |
| printf "The values for the first parameter may be one of the following:\n\n" | |
| printf " \e[1m-\e[m Will result in the default output.\n" | |
| printf " \e[1m-b\e[m This will display the 8 color version of this chart.\n" | |
| printf " \e[1m-f\e[m This will display the 256 color version of this chart using foreground colors.\n" | |
| printf " \e[1m-q\e[m This will display the 256 color version of this chart without the extra text.\n" |