Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View JBlond's full-sized avatar

Mario JBlond

  • Germany
  • 09:37 (UTC +02:00)
View GitHub Profile
@JBlond
JBlond / gist:859fbe13e230da45d257
Created November 7, 2014 16:05
Geo Locate EUROPE by IP
<html>
<head>
</head>
<body>
<?php
$current_ip = $_SERVER["REMOTE_ADDR"];
#echo '<b>' . $current_ip .'</b><br>';
# ip address first bloc 41,196,197,102,105,154 are Africa, rest is Europe (e.g. 41.0.0.0 etc.)
@JBlond
JBlond / highlight.js
Created November 7, 2014 16:09
highlight.js
//JAVA-Script Code for ioTemplateEditor.asp
//Author: Joerg Trautmann
var cScriptVersionTemplateEditor = "6.75";
var cRed = "#ff0000";
var cBlack = "#000000";
var cBlue = "#0000ff";
var cGreen = "#00ff00";
var cGray = "#a0a0a0";
@JBlond
JBlond / sort_array_by_key.php
Created January 27, 2015 14:04
sort array by key
<?php
/*
Array
(
[0] => Array
(
[hashtag] => a7e87329b5eab8578f4f1098a152d6f4
[title] => Flower
[order] => 3
)
@JBlond
JBlond / win10_reg.cmd
Created August 21, 2015 11:44
Windows 10 registry hack
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\UpgradeExperienceIndicators" /v UpgEx | findstr UpgEx
if "%errorlevel%" == "0" GOTO RunGWX
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Appraiser" /v UtcOnetimeSend /t REG_DWORD /d 1 /f
schtasks /run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
:CompatCheckRunning
schtasks /query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
Powershell -Command "Get-ScheduledTask -TaskName 'Microsoft Compatibility Appraiser' -TaskPath '\Microsoft\Windows\Application Experience\'" | Find "Ready"
if NOT "%errorlevel%" == "0" ping localhost >nul &goto :CompatCheckRunning
:RunGWX
schtasks /run /TN "\Microsoft\Windows\Setup\gwx\refreshgwxconfig"
@JBlond
JBlond / httpd.conf
Last active September 3, 2015 14:12
secure SSL config
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15553000"
</IfModule>
SSLUseStapling Off
SSLSessionCache shmcb:/opt/apache2/logs/ssl_gcache_data(512000)
SSLStaplingCache shmcb:/opt/apache2/logs/ssl_stapling_data(512000)
SSLOptions +StrictRequire +StdEnvVars -ExportCertData
SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
SSLCompression Off
SSLHonorCipherOrder On
@JBlond
JBlond / httpd.conf
Last active October 18, 2015 12:41
jboss config
<VirtualHost *:443>
DocumentRoot C:/www/
ServerName example.com
ServerAlias www.example.com
<Directory C:/www/>
Options Indexes FollowSymlinks Multiviews ExecCGI
AllowOverride None
<RequireAll>
Require all granted
</RequireAll>
@JBlond
JBlond / NoWin10.reg
Created February 5, 2016 10:56
Deactivate Windows Update
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Gwx]
"DisableGwx"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DisableOSUpgrade"=dword:00000001
@JBlond
JBlond / 0_security_headers.conf
Last active February 5, 2016 13:00
Apache security config
<IfModule mod_headers.c>
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-XSS-Protection "1; mode=block"
Header always set X-Content-Type-Options "nosniff"
</IfModule>
@echo off
setlocal enabledelayedexpansion
set SOURCE_DIR=C:\build\subversion-1.9.3-ap24-x86
set DEST_DIR=C:\build\subversion-1.9.3-ap24-x86_pdb
set FILENAMES_TO_COPY=*.pdb
for /R "%SOURCE_DIR%" %%F IN (%FILENAMES_TO_COPY%) do (
if exist "%%F" (
set FILE_DIR=%%~dpF
@JBlond
JBlond / build_svn_1.9.txt
Last active May 31, 2016 20:21
Build svn 1.9
x64
http://subversion.apache.org/download/#recommended-release
get sqlite-amalgamation from http://www.sqlite.org/download.html
put NOT Compiled zlib into the source tree
http://code.google.com/p/serf/downloads/list
needs scons ( https://bitbucket.org/scons/scons/downloads/scons-2.3.5.win-amd64.exe )
Look for http://sourceforge.net/p/win32svn/code/HEAD/tree/