Skip to content

Instantly share code, notes, and snippets.

View blackknight36's full-sized avatar
💭
I may be slow to respond.

Michael blackknight36

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/python
# Used ideas from here, but perl + gssapi + ldap doesn't work on RHEL6
# http://www.sysadmin.org.au/index.php/2012/12/authorizedkeyscommand/
# Packages required:
# yum install -y python-kerberos python-ldap python-krbV
# Put this file into /usr/local/bin/authorized_keys.py, fix perms:
# chmod 500 /usr/local/bin/authorized_keys.py
# Add sshd setting + restart
# cat >> /etc/ssh/sshd_config << EOF
#!/usr/bin/env python
# This script copies character sprite data from the source ROM into the destination ROM.
#All sprites are 0x200 in size (ie 0x25000-0x251FF)
#Fighter = 0x25000 Knight = 0x25C00
#Thief = 0x25200 Ninja = 0x25E00
#BlackBelt = 0x25400 Master = 0x26000
#RedMage = 0x25600 RedWizard = 0x26200
#WhiteMage = 0x25800 WhiteWizard = 0x26400
This code fills the screen with a solid color. To test run this code at https://skilldrick.github.io/easy6502/
LDA #$03
LDX #$00
loop:
STA $0200, X
STA $0300, X
ASL $0300, X
STA $0400, X
#!/usr/bin/python
# This script requires the BeautifulSoup module and python-requests to work
import requests, sys
from bs4 import BeautifulSoup
def download_file(file_url):
local_filename = file_url.split('/')[-1]
r = requests.get(file_url, stream=True)
use LWP::UserAgent;
use HTTP::Request;
use XML::Parser;
# Update these values to match your user settings and instance URL. This example will work against Secret Server Online.
my $username = "ThycoticTest";
my $password= "passwordt";
my $organizationCode= "RT9R"; # Can be left blank for Secret Server Installed (on-premise) edition
my $domain = ""; # Only needed for AD login
my $WebServiceUrl = "https://www.secretserveronline.com/webservices/SSWebService.asmx"; # Or URL to your server and to the SSWebService.asmx file
<IfModule ldap_module>
<Location />
# Using this to bind
AuthLDAPBindDN "<%= @ldap_bind_dn %>"
AuthLDAPBindPassword "<%= @ldap_bind_pass %>"
# search user
AuthLDAPURL "ldap://dc01.example.com/dc=example,dc=com?sAMAccountName?sub?(objectClass=*)"
AuthType Basic
AuthName "USE YOUR WINDOWS ACCOUNT"
#!/usr/bin/ruby
procs="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit".split()
stats = open('/proc/net/rpc/nfs') { |f| f.each_line.find { |line| line.include?("proc4") } }.split()
i = 11
hostname = `hostname -f`.chomp!
procs.each do |p|
puts "PUTVAL #{hostname}/nfs-v4client/nfs_procedure-#{p} interval=10 N:" + stats[i]
i += 1
#!/usr/bin/ruby
procs="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit".split()
stats = open('/proc/net/rpc/nfsd') { |f| f.each_line.find { |line| line.include?("proc4ops") } }.split()
i = 11
hostname = `hostname -f`.chomp!
procs.each do |p|
puts "PUTVAL #{hostname}/nfs-v4server/nfs_procedure-#{p} interval=10 N:" + stats[i]
i += 1
#!/bin/bash
NFSD=/proc/net/rpc/nfsd
procs="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit"
i=12;
for proc in $procs; do
echo -n "$proc: "
awk "/proc4ops/ {print \$${i}}" /proc/net/rpc/nfsd
i=$(expr $i + 1)
@blackknight36
blackknight36 / building_lustre_client_rpms.md
Last active December 21, 2017 21:33 — forked from tcooper/building_lustre_client_rpms.md
Lustre Client RPM Build Process