Skip to content

Instantly share code, notes, and snippets.

View MarekVigas's full-sized avatar
🔥
I love to delete code

Marek Vigaš MarekVigas

🔥
I love to delete code
View GitHub Profile
@MarekVigas
MarekVigas / docker.sh
Created September 5, 2019 11:11
Check if inside docker container
#!/bin/bash
if [ -f /.dockerenv ]; then
echo "I'm inside matrix ;(";
else
echo "I'm living in real world!";
fi
@MarekVigas
MarekVigas / Dockerfile
Created August 20, 2019 13:33
PostgreSql 11 Dockerfile
#
# example Dockerfile for https://docs.docker.com/engine/examples/postgresql_service/
#
FROM ubuntu:18.04
# Install curl
RUN apt-get update && apt-get install -y wget gnupg2
# Add the PostgreSQL PGP key to verify their Debian packages.
@MarekVigas
MarekVigas / gist:d3eaa22c1e7437bec20c0f33d787f98f
Created November 8, 2018 10:31
find max using bitwise operation
int findMax( int x, int y){
int z = x - y;
int i = (z >> 31) & 0x1;
int max = x - i * z;
return max;
}
041706d1bd7ffe39b677b3cc46f0164b704f637d364f458066a48c9bce95e31f4d434b30f0c979b8214e1dbd5dcfd6cbfacf54b5a846ab95c58b32a97d3128e867