Skip to content

Instantly share code, notes, and snippets.

View alexruzenhack's full-sized avatar

Alex Ruzenhack alexruzenhack

View GitHub Profile
@alexanderbartels
alexanderbartels / web.xml
Created September 24, 2015 16:06
web.xml to with mime type for web fonts
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Web-Fonts</display-name>
<!-- web fonts -->
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
@chinboon
chinboon / wildfly10-install.sh
Last active October 31, 2022 06:10
Script to install Wildfly 10 and JDK 8 into Amazon Linux AMI
#!/bin/sh
# remove previous versions of java
sudo yum remove -y java-1.7.0-openjdk
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm"
sudo yum localinstall -y jdk-8u92-linux-x64.rpm
java -version
# download wildfly
sudo wget http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.tar.gz
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@wojteklu
wojteklu / clean_code.md
Last active June 10, 2024 12:18
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@nathancolgate
nathancolgate / ssl_puma.sh
Last active May 31, 2022 09:13 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key
$ cd ~/.ssh
$ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048
# 2) Generate RSA key
$ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key
# 3) Get rid of private key
$ rm lvh.me.pass.key
@jongalloway
jongalloway / aspnetcore-one-hour-makeover.md
Last active April 30, 2022 08:24
ASP.NET Core One Hour Makeover