Skip to content

Instantly share code, notes, and snippets.

View romantomjak's full-sized avatar

Roman Tomjak romantomjak

View GitHub Profile
@romantomjak
romantomjak / letsencrypt-ssl
Last active March 26, 2016 14:11 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
location ~ /.well-known {
allow all;
root /var/www/letsencrypt;
}
ssl on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/ssl/certs/dhparam.pem;

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

/*
* Apple - apple.com
* SF Pro Display used on apple.com as of iPhone 7 (RED) launch (March 21st 2017)
usage:
- font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
- known issues:
- Access to Font at 'http://www.apple.com/wss/fonts/SF-Pro-Display/v1/sf-pro-display_bold.woff' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.
index.html:1 Access to Font at 'http://www.apple.com/wss/fonts/SF-Pro-Display/v1/sf-pro-display_bold.ttf' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.
@romantomjak
romantomjak / GIF-Screencast-OSX.md
Created April 18, 2018 22:50 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@romantomjak
romantomjak / attributes.rb
Created January 14, 2020 22:07 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@romantomjak
romantomjak / ffmpeg.md
Created April 28, 2021 18:10 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@romantomjak
romantomjak / ANSI.md
Created October 5, 2021 21:03 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
#!/usr/bin/env python3
#
# This script sets the service name (i.e. drive group) for the given OSDs
# on the host on which it is executed.
#
# For example, to set service_name=osd.foo for OSDs 1, 2 and 3, you'd run:
#
# ./set-osd-service-name.py osd.foo 1 2 3
#
# For each OSD specified, it will set service_name in that OSD's unit.meta