Skip to content

Instantly share code, notes, and snippets.

View smb's full-sized avatar
🎮
Working

Steffen smb

🎮
Working
View GitHub Profile
@smb
smb / esxi_lldp_control.sh
Created January 11, 2023 15:35 — forked from raspi/esxi_lldp_control.sh
Enable/Disable LLDP on VMWare ESXi. Requires SSH access to ESXi. Doesn't require vCenter.
#!/bin/sh
# Enable/Disable LLDP on vSwitch ports on VMWare ESXi
# Tested with ESXi 6.0.0 3620759
# Doesn't need vCenter, only SSH access to the ESXi machine
# (c) Pekka "raspi" Jarvinen 2016 http://raspi.fi/
SWITCH=$1
OPERATION=$2
if [ "$SWITCH" = "" ] || [ "$OPERATION" = "" ]; then
@smb
smb / ztools_installer.abap
Created March 8, 2019 13:01
abapgit installer
CLASS ztools_installer DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS pull
IMPORTING
!iv_url TYPE string
@smb
smb / setAcl
Created January 16, 2019 12:01
#!/bin/sh
echo $@
sudo setfacl -R -m u:"www-data":rwX -m u:`whoami`:rwX $@
sudo setfacl -dR -m u:"www-data":rwX -m u:`whoami`:rwX $@
testtest
test
t

Keybase proof

I hereby claim:

  • I am smb on github.
  • I am sbuehl (https://keybase.io/sbuehl) on keybase.
  • I have a public key ASDsqprgdtObhIyJuo0B8D1N8YankEqNvZIv2bT4PKmhTAo

To claim this, I am signing this object:

@smb
smb / gist:83344889ec5856cde601
Created September 3, 2014 09:55
authy - import google authenticator data
adb shell
adb> su
adb> sqlite3 /data/data/com.google.android.apps.authenticator2/databases/databases
adb> select 'otpauth://totp/' || email || '?secret=' || secret from accounts;
for-each $result:
qrcode.exe -s 10 -o qrCode.png $result
@smb
smb / bma2otp.rb
Last active August 29, 2015 14:05 — forked from stbuehler/bma2otp.rb
#!/usr/bin/ruby
# REQUIRES:
# * rooted android, as otherwise you can't read the applications private data
# qrcode: https://code.google.com/p/qrencode-win32/downloads/list
# This script "decrypts" the token from the internal state of the
# Battle.net Mobile Authenticator on android application, converting
# it into an "otpauth" url (https://code.google.com/p/google-authenticator/wiki/KeyUriFormat)
# and (using qrencode and display) displays it as QR code on the screen
@smb
smb / irssi.conf
Created July 25, 2014 13:02
irssi logstash config
input {
file {
path => "/home/.../irclogs/*/#*/*.log"
start_position => "end"
type => "irssi_logs"
}
}
filter {
if [type] == "irssi_logs" {
Disable the WordPress Admin Bar for all Users and Visitors
Turn off the toolbar with one simple line.
view plain
/*
* Disable the WordPress Admin Bar for all Users and Visitors
*/
remove_action( 'init', '_wp_admin_bar_init' );
^ top
Enable the WordPress Admin Bar for admins only
@smb
smb / 0_reuse_code.js
Created November 6, 2013 11:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console