Skip to content

Instantly share code, notes, and snippets.

View jp1337's full-sized avatar
⚜️
A user interface is like a joke. If you have to explain it, it's not that good.

JP jp1337

⚜️
A user interface is like a joke. If you have to explain it, it's not that good.
View GitHub Profile
@jp1337
jp1337 / apache.md
Last active October 4, 2017 13:24
Apache Configuration Examples

Apache Configuration Examples

Generically Redirect HTTP TO HTTPS

<VirtualHost *:80>
        RewriteEngine On
        RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
@jp1337
jp1337 / mssql_index.sql
Last active October 6, 2018 13:35
Useful Microsoft SQL-Server Commands
-- ----------------
-- Reorganize Index
-- ----------------
USE MYDATABASE;
GO
EXECUTE sp_msForEachTable 'SET QUOTED_IDENTIFIER ON; ALTER INDEX ALL ON ? REBUILD;'
GO
EXECUTE sp_msForEachTable 'SET QUOTED_IDENTIFIER ON; ALTER INDEX ALL ON ? REORGANIZE;'
GO
@jp1337
jp1337 / Debian Setup.md
Last active January 13, 2020 19:31
Debian server setup

Debian server setup

Description

This my type of setting up a debian non-gui root server. Use this at your own risk! I use debian for a long time and added some configuration that prevented some errors. If you have questions or suggestions please contact me.

At installing time of the server I use the DVD-Image and set up the server using a full qualified domain name. When it comes to partitioning the server I always use the entire disk as one partition. This is because I don't want to think about placing any files into the wrong partition. Also I mostly use the opt folder instead of the home folder to place some scripts or software.

Setup Steps