Skip to content

Instantly share code, notes, and snippets.

View JBlond's full-sized avatar

Mario JBlond

  • Germany
  • 09:53 (UTC +02:00)
View GitHub Profile
#!/bin/bash
mysql -uroot -ppassword -e "SHOW PROCESSLIST;"
@echo off
"C:\Program Files\Microsoft Office 15\root\office15\groove.exe" /clean /all
runas /user:PERFORMANCE\Administrator "cmd"
compmgmt.msc
PS C:\Users\administrator.PERFORMANCE\Desktop> Get-WmiObject -computer localhost -class Win32_ServerConnection > there.txt
@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 / index.html
Created June 10, 2016 15:41 — forked from josheinstein/index.html
A CodePen by Josh Einstein. Keyboard Navigation in Table Cells - Uses jQuery to enable arrow key functionality in tables. Pressing up/down/left/right in input fields will move focus to adjacent cells. Doesn't currently deal with column spans or custom input scenarios such as on-the-fly input fields.
<table id="people">
<thead>
<th>First Name</th>
<th>Last Name</th>
<th>Phone Number</th>
<th>Location</th>
</thead>
<tbody>
<tr>
<td><input /></td>
@JBlond
JBlond / format_number.js
Created July 19, 2016 10:11
German money format
function format_number($number, $use_fixed) {
"use strict";
if($use_fixed !== false){
$number = $number.toFixed(2) + '';
}
else
{
$number = $number + '';
}
var $array = $number.split('.');
@JBlond
JBlond / .bashrc
Last active December 20, 2023 19:39
ssh host autocomplete
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@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