Skip to content

Instantly share code, notes, and snippets.

View m0veax's full-sized avatar
🐱
🥙

Patrick Kilter m0veax

🐱
🥙
  • Vivawest Wohnen GmbH
  • Germany, Gladbeck
View GitHub Profile
@m0veax
m0veax / vagrant-scp.sh
Created November 24, 2017 11:52 — forked from colindean/vagrant-scp.sh
A quick way to transfer a file to the home directory on a Vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?"
@m0veax
m0veax / websocket-check.php
Last active July 25, 2024 05:23 — forked from htp/curl-websocket.sh
Test a WebSocket using php fsockopen, bit chaotic, but working for me. You can use that for a HTTP Sensor in PRTG or Nagios
<?php
error_reporting(-1);
$host = "your-host.tld"; // your websocket url without protocol part
$SecWebsocketKey = "your key from websocket connection"; // try wireshark or developer Tools to get this
$origin = "http://$host/"; // origin for the header
$host = 'localhost'; //where is the websocket server
@m0veax
m0veax / Migrate-Db.ps1
Created January 25, 2019 17:59 — forked from mkropat/Migrate-Db.ps1
Run schema migration scripts on a SQL Server databse
<#
.SYNOPSIS
Run schema migration scripts on a SQL Server databse
.DESCRIPTION
The database version is kept track of in an extended property ('db-version') on
the SQL Server database. The version number comes from the prefix of the
filename of each .sql migration script (see -SchemaDir parameter help for more
information).
@m0veax
m0veax / MySQL.ps1
Created January 25, 2019 18:02 — forked from ptflp/MySQL.ps1
Using MySQL from powershell
Param(
[Parameter(
Mandatory = $true,
ParameterSetName = '',
ValueFromPipeline = $true)]
[string]$Query
)
$MySQLAdminUserName = 'USER'
$MySQLAdminPassword = 'PASSWORD'
$MySQLDatabase = 'MYDBNAME'
@m0veax
m0veax / MultipleDevicesOverTCP.md
Created November 19, 2020 05:58 — forked from teocci/MultipleDevicesOverTCP.md
How to connect multiple Android devices with ADB over TCP

#How to connect multiple Android devices with ADB over TCP

From your device, if it is rooted

According to a post on xda-developers, you can enable ADB over Wi-Fi from the device with the commands:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd