Skip to content

Instantly share code, notes, and snippets.

View selfcommit's full-sized avatar
🏠
Working from home

Dan OBoyle selfcommit

🏠
Working from home
View GitHub Profile
<?php
$Session = Gdn::Session();
$userid = $Session->UserID;
print "Information for user $userid<br>";
if ($Session->IsValid()) {
$RoleModel = new RoleModel();
$UserRoles = $RoleModel->GetByUserID(Gdn::Session()->UserID);
$IsPremium=FALSE;
foreach ($UserRoles as $UserRole){
Vent Normalization makes every bodies voice the exact same volume. In essence, you won't blow your ear's out or have difficulty hearing people. 
____________________ 
Here's how: 
- Go to Setup 
- Enable Direct Sound 
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 import MySQLdb as mdb
4 import sys
5
6 try:
7 con = mdb.connect('localhost', 'bitsync', 't2dKHnuhXsMKEhN5', 'cupcake')
8 cur = con.cursor()
9 cur.execute("UPDATE cup_show SET bitsync_rw_secret = 'Test-rw' WHERE id=2;")
10 cur.execute("UPDATE cup_show SET bitsync_ro_secret = 'Test-ro' WHERE id=2;")
@selfcommit
selfcommit / FizzBuzz.py
Last active August 29, 2015 13:56
Python FizzBuzz
for x in xrange(1,101):
fizzbuzz_check = {'Fizz':0, 'Buzz':0}
if x%3 == 0:
#print str(x)+" Fizz"
fizzbuzz_check['Fizz'] = 1
pass
if x%5 == 0:
#print str(x)+" Buzz"
fizzbuzz_check['Buzz'] = 1
pass
@selfcommit
selfcommit / PXE Boot for Chromezilla
Last active August 29, 2015 13:56
PXE Boot for Chromezilla
#Edit file located at /tftpboot/pxelinux.cfg/default
\n
LABEL Chromebook image for Acers
kernel fog/dell/memdisk raw #This line relative to /tftpboot get memdisk here: http://goo.gl/2WHKVG
append iso initrd=chromezilla/chromezilla.iso raw #this line is relative to /tftpboot this is your iso
MENU LABEL Ubuntu
TEXT Clonezilla Converstion Tool
ENDTEXT
@selfcommit
selfcommit / view.ps1
Created February 21, 2014 17:58
Vmware View Monitor
############################################################################
# Scriptname: Pool_Prov.ps1
# Description: Checks against ADAM for Pool Status
# By: Adam Baldwin
# Edited for Hillsborough Township Public Schools by Dan O'Boyle
# Usage: Use this script to check whether any pools are in a non-provisioning
# state and send an email alert with a list of errors
#
############################################################################
@selfcommit
selfcommit / FizzBuzz.ps1
Created February 21, 2014 19:36
Better FizzBuzz
1 .. 100 | foreach{
if ($_ % 15 -eq 0) {
Write-Host "FizzBuzz"
}
elseif ($_ % 5 -eq 0 ) {
Write-Host "Fizz"
}
elseif ($_ % 3 -eq 0 ) {
Write-Host "Buzz"
140219 18:30:34 [Warning] Checking table: './drinking_wp932/wp_usermeta'
140310 3:03:30 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140310 3:03:30 [Note] Plugin 'FEDERATED' is disabled.
140310 3:03:30 InnoDB: The InnoDB memory heap is disabled
140310 3:03:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140310 3:03:30 InnoDB: Compressed tables use zlib 1.2.8
140310 3:03:30 InnoDB: Using Linux native AIO
140310 3:03:30 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140310 3:03:30 InnoDB: Completed initialization of buffer pool
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
$csv = Import-Csv -Delimiter t -Encoding UTF8 -Header Groups -Path C:\Users\doboyle.STACKEXCHANGE\Desktop\groups.txt
foreach ($i in $csv) {
$Group = $i.Groups
New-ADGroup -Name $Group -GroupCategory Security -GroupScope Global -DisplayName $Group -Path "OU=GADS_Groups,OU=IT,DC=Something,DC=YourDomain,DC=com" -Description $Group
}