Skip to content

Instantly share code, notes, and snippets.

View JBlond's full-sized avatar

Mario JBlond

  • Germany
  • 23:40 (UTC +02:00)
View GitHub Profile
@JBlond
JBlond / svn build_1.9.txt
Last active August 16, 2016 07:35
svn build
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
https://serf.apache.org/download
needs scons ( https://bitbucket.org/scons/scons/downloads/scons-2.3.5.win-amd64.exe )
open zlib\win32\Makefile.msc
replace line 20 with
@JBlond
JBlond / set_ntp.bat
Created January 2, 2017 16:44
windows server time NTP sync
@echo off
net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org"
w32tm /config /reliable:yes
net start w32time
w32tm /query /configuration
w32tm /resync
@JBlond
JBlond / check_httpd_limits.pl
Created January 26, 2017 14:21
check limits
#!/usr/bin/perl
# Copyright 2012 - Jean-Sebastien Morisset - http://surniaulula.com/
#
# This script is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This script is distributed in the hope that it will be useful, but WITHOUT
@JBlond
JBlond / test0.bat
Last active February 3, 2017 14:16
test vbs script for apache on windows
@echo off
echo Content-Type: text/plain
echo.
dir
@JBlond
JBlond / changes.diff
Created May 29, 2017 16:40
mod_authn_ntlm_january_12th_diff
diff --git a/Makefile b/Makefile
index 429f3f9..92ce02b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,19 @@
-APACHEDIR=C:\Apache_24_Module\httpd-2.4.10
-MSVCDIR=C:\Program Files (x86)\\Microsoft Visual Studio 11.0\VC
-PLATSDKDIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A
+#APACHEDIR=C:\Apache_24_Module\httpd-2.4.10
+#MSVCDIR=C:\Program Files (x86)\\Microsoft Visual Studio 11.0\VC
@JBlond
JBlond / HeidiDecode.js
Created June 19, 2017 09:31 — forked from jpatters/HeidiDecode.js
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
@JBlond
JBlond / alias.bash
Last active November 28, 2017 15:32
bash alias
## shortcut for iptables and pass it via sudo#
alias ipt='sudo /sbin/iptables'
# display all rules #
alias iptlist='sudo /sbin/iptables -L -n -v --line-numbers'
alias iptlistin='sudo /sbin/iptables -L INPUT -n -v --line-numbers'
alias iptlistout='sudo /sbin/iptables -L OUTPUT -n -v --line-numbers'
alias iptlistfw='sudo /sbin/iptables -L FORWARD -n -v --line-numbers'
alias firewall=iptlist
@JBlond
JBlond / check_login.php
Last active January 5, 2018 11:29
Magento User Login
<?phpMage::app('default');
Mage::getSingleton('core/session', array('name'=>'frontend'));
$sessionCustomer =Mage::getSingleton("customer/session");
if ($sessionCustomer->isLoggedIn()) {
return "Logged";
} else {
return "Not Logged";
}
@JBlond
JBlond / commands.sh
Last active January 24, 2018 13:19
most used commands
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | grep -v "ls" | grep -v "cd" | grep -v "exit" | column -c3 -s " " -t | sort -nr | nl | head -n10