Skip to content

Instantly share code, notes, and snippets.

View tohoff82's full-sized avatar
🏠
Working from home

tohoff tohoff82

🏠
Working from home
  • Mykolaiv
View GitHub Profile
@tohoff82
tohoff82 / DockerFile
Created February 24, 2021 15:17 — forked from zhunhung/DockerFile
Selenium Linux DockerFile
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
# INSTALL DEPENDENCIES
RUN apt-get install -y curl unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
@tohoff82
tohoff82 / Dockerfile
Created February 23, 2021 18:16 — forked from varyonic/Dockerfile
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
@tohoff82
tohoff82 / mongodb_c#_cheatsheet.md
Created February 10, 2021 13:27 — forked from a3dho3yn/mongodb_c#_cheatsheet.md
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@tohoff82
tohoff82 / site.conf
Created July 27, 2020 14:38 — forked from paskal/site.conf
Nginx configuration for best security and modest performance. Full info on https://terrty.net/2014/ssl-tls-in-nginx/
# read more at https://terrty.net/2014/ssl-tls-in-nginx/
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net
# your nginx version might not have all directives included, test this configuration before using in production against your nginx:
# $ nginx -c /etc/nginx/nginx.conf -t
server {
# public key, contains your public key and class 1 certificate, to create:
# (example for startssl)
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null
@tohoff82
tohoff82 / Aes128Ctr.cs
Created January 4, 2020 22:35 — forked from DamirLisak/Aes128Ctr.cs
A c# implementation of the aes counter mode encryption algorithm (aes ctr) based on the javascript version by Chris Veness https://gist.github.com/patches-76431/7483159
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace aes
{
public static class ArrayExtensions
{
/// <summary>
@tohoff82
tohoff82 / .htaccess
Created March 12, 2019 12:15 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for an Angular 7, Angular 6, Angular 5 (and older app) in production.
# INSTRUCTION:
# There are two options for the redirection:
# Option 1) (default): Your app is directly on the root of the domain.
# Option 2): Your app is placed in a subfolder from the root of the domain.
#
# If you have issues with browser caching you can uncomment the BROWSER CACHING part
# For new versions of this Gist go to:
# https://gist.github.com/julianpoemp/bcf277cb56d2420cc53ec630a04a3566