Skip to content

Instantly share code, notes, and snippets.

View russom-woldezghi's full-sized avatar

Russom Woldezghi russom-woldezghi

View GitHub Profile
### Keybase proof
I hereby claim:
* I am russom-woldezghi on github.
* I am russomwoldezghi (https://keybase.io/russomwoldezghi) on keybase.
* I have a public key ASAwe_krk7PZ9t5-7x61vzhqSfFFQIxVGJijBE2dkq6OBgo
To claim this, I am signing this object:
find . -name _notes -type d -exec rm -rf {} \;
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
@russom-woldezghi
russom-woldezghi / index.html
Last active December 12, 2015 02:28
jQuery slider
<!DOCTYPE html>
<html>
<head>
<title>jQuery Slider</title>
<!-- jQuery -->
<script src="http://code.jquery.com/jquery-1.5.js"></script>
<script type="text/javascript" src="slider.js"></script>
<!--CSS -->
<link href="style.css" rel="stylesheet" media="screen">
</head>
@russom-woldezghi
russom-woldezghi / update.ps1
Created February 1, 2013 21:20
Update Active Directory users using PowerShell from .csv file (without using Quest).
Import-Module ActiveDirectory
$USERS = Import-CSV c:\scripts\usersupdate.csv
$USERS|Foreach{
Set-ADUSer -Identity $_.samaccountname -TelephoneNumber $_.TelephoneNumber -scriptPath $_.LoginScript -homeDirectory $_.HomeDirectory -title $_.JobTitle -department $_.Department -telephoneNumber $_.WorkPhone
-facsimileTelephoneNumber $_.Fax -office $_.Office -streetAddress $_.StreetAddress -l $_.City -st $_.State -postalCode $_.PostalCode -c $_.Country -company $_.Company -manager $_.ManagerAdspath }
@russom-woldezghi
russom-woldezghi / update_users.ps1
Created February 1, 2013 19:03
PoweShell script to batch update Active Directory User accounts from .csv file (using Quest)
Import-CSV "c:\Path\to\file\usersupdate.csv" |
ForEach-Object {Set-QADUSer $_.SamAccountName -scriptPath $_.LoginScript -homeDirectory $_.HomeDirectory -title $_.JobTitle -department $_.Department -office $_.Office -streetAddress $_.StreetAddress -l $_.City -State $_.State -postalCode $_.PostalCode -company $_.Company -Manager $_.ManagerAdspath }
@russom-woldezghi
russom-woldezghi / all_contacts.bat
Created February 1, 2013 18:56
Export Active Directory contacts to a .txt file using firstname, lastname, mail, etc.
dsquery * domainroot -filter "(&(objectCategory=Contact)(objectClass=Contact))" -attr cn displayName givenName sn mail canonicalName distinguishedName legacyExchangeDN -limit 0 > "C:\Path\to\all_contacts.txt"
@russom-woldezghi
russom-woldezghi / all_users.bat
Created February 1, 2013 18:52
Export Active Directory users accounts details such as email, username, objectid, etc.
dsquery * domainroot -filter "(&(objectCategory=Person)(objectClass=User))" -attr cn displayName givenName sn userPrincipalName sAMAccountName mail ProfilePath scriptPath homeDrive homeDirectory uniqueMember canonicalName distinguishedName objectSid legacyExchangeDN description -limit 0 > "C:\Path\to\files\All_Users.txt"
@russom-woldezghi
russom-woldezghi / customloginbg.bat
Last active December 12, 2015 01:48
Save as a bat file and set BackgroundImageYouWantToUse to the location of the image you want to use.
@echo off
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background /t REG_SZ /v OEMBackground /d 1 /f
mkdir %windir%\system32\oobe\info
mkdir %windir%\system32\oobe\info\backgrounds
copy C:\path\to\custombg %windir%\system32\oobe\info\backgrounds\backgroundDefault.jpg