Skip to content

Instantly share code, notes, and snippets.

View lashomb's full-sized avatar

lashomb lashomb

View GitHub Profile
@lashomb
lashomb / dell-h310.md
Created August 13, 2019 04:12 — forked from woble/dell-h310.md
Flashing Dell PERC H310 to IT mode

If you have a Dell Perc H310 and your computer won't boot then you'll need to cover PCIe pins B5 and B6. You can cover them with a thin piece of electrical tape.

H310 DOS

  1. megacli.exe -AdpAllInfo -aAll -page 20 Write down SAS address.
  2. megarec.exe -writesbr 0 sbrempty.bin If this fails move on to next step.
  3. megarec.exe -cleanflash 0 Reboot.
  4. sas2flsh.exe -o -f 6GBPSAS.fw Reboot.
  5. sas2flsh.exe -o -f 2118it.bin
  6. s2fp19.exe -o -sasadd 500xxxxxxxxxxxxx
@lashomb
lashomb / office2011-remove_inactive_identities.py
Last active October 12, 2016 11:26
office2011-remove_inactive_identities.py
#!/usr/bin/python
from SystemConfiguration import SCDynamicStoreCopyConsoleUser
import glob, os, shutil
try:
current_user = SCDynamicStoreCopyConsoleUser(None, None, None)[0]
except TypeError:
nouser = 'No user logged in.'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DC</key>
<dict>
<key>FeatureLockdown</key>
<dict>
<key>cIPM</key>
<dict>
YOU SHALL... PASS
, _,-
(\ _,-','
\\ ,-" ,'
\\ ,' ,'
\\ _:.----__.-."-._,-._
\\ .-".:--`:::::.:.:' ) `-.
\\ `. ::L .::::::'`-._ ( ) :
@lashomb
lashomb / gist:7419958
Last active December 28, 2015 01:19
First attempt at installing something with python
#/usr/bin/python
import os, requests
node_path = "/usr/local/bin/node"
node_url = "http://nodejs.org/dist/v0.10.21/node-v0.10.21.pkg"
os.chdir("/Users/Shared")
def download_file(url):
pkg_name = url.split('/')[-1]
@lashomb
lashomb / jss_query
Created October 29, 2013 04:16
query from computers_denormalized
SELECT cd.username, cd.computer_name, cd.make, cd.model, cd.total_ram_mb, cd.operating_system_name, cd.operating_system_version, cd.operating_system_build, cd.serial_number, cd.processor_type, cd.processor_count, cd.processor_speed_mhz FROM computers_denormalized AS cd INTO OUTFILE '/Users/Shared/compinfo.txt';
@lashomb
lashomb / computers_denormalized
Created October 29, 2013 03:52
What's in the computers_denormalized table in your JSS database.
+----------------------------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------------------+--------------+------+-----+---------+-------+
| computer_id | int(11) | NO | MUL | -1 | |
| computer_name | varchar(60) | NO | MUL | | |
| udid | varchar(40) | NO | MUL | | |
| last_report_id | int(11) | NO | MUL | -1 | |
| asset_tag | varchar(40) | NO | MUL | | |
| platform | varchar(20) | NO | | | |
| bar_code_1 | varchar(255) | NO | MUL | | |
@lashomb
lashomb / php54.rb
Last active December 24, 2015 22:38
php54 --with-mssql --with-thread-safety
require File.join(File.dirname(__FILE__), 'abstract-php')
class Php54 < AbstractPhp
init
url 'http://www.php.net/get/php-5.4.20.tar.bz2/from/this/mirror'
sha1 'b468faaf1f88dd4dd5dbeb11283dd9d76c523cd5'
version '5.4.20'
head 'https://github.com/php/php-src.git', :branch => 'PHP-5.4'