This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divs = document.getElementsByTagName("div"); | |
var list = new Array(); | |
for( var i = 0; i < divs.length; i++ ) { | |
if( divs[i].getAttribute("data-testid") == "friend_list_item") { | |
var friend = divs[i].getElementsByClassName("fwb")[0]; | |
var profile = friend.getElementsByTagName("a")[0]; | |
list.push(friend.innerText + ": " + profile.href); | |
} | |
} | |
console.log(list.length+" friends"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOSTNAME="host.yourdomain.com" | |
USERNAME="username" | |
PASSWORD="password" | |
LOG_FILE="/tmp/ddns/ddns.log" | |
while true; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ActiveDirectory | |
$users = Get-ADUser -Server dc01.drewchapin.com -Properties proxyAddresses,msRTCSIP-PrimaryUserAddress | |
# -Filter { physicalDeliveryOfficeName -eq "Location Name" } | |
ForEach( $user in $users ) | |
{ | |
$sip1 = $user.'msRTCSIP-PrimaryUserAddress' | |
$sip2 = $user.proxyAddresses | Where { $_ -like "SIP:*" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub SendEmail( fromAddress, toAddress, subject, body ) | |
On Error Resume Next | |
Dim Email | |
Set Email = CreateObject("CDO.Message") | |
Email.From = fromAddress | |
Email.To = toAddress | |
Email.Subject = subject | |
Email.TextBody = body | |
Email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 | |
Email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.google.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Public Const HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0 | |
Public Const HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 1 | |
''' | |
''' Determine if specified file exists | |
''' | |
Public Function IsValidLink(path As String) As Boolean | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function outOfLikes() { | |
var h3 = document.getElementsByTagName("h3"); | |
for( var i = 0; i < h3.length; i++ ) { | |
if( h3[i].innerText == "You're Out of Likes!" ) { | |
return true; | |
} | |
} | |
} | |
function likeHer() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using System.Windows.Forms; | |
namespace MyExcelAddin | |
{ | |
public partial class ThisAddIn | |
{ | |
public Win32Window MainWindow { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;------------------------------------------------------------------------------- | |
; Includes | |
!include "MUI2.nsh" | |
!include "LogicLib.nsh" | |
!include "WinVer.nsh" | |
!include "x64.nsh" | |
;------------------------------------------------------------------------------- | |
; Constants | |
!define PRODUCT_NAME "My Application" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for group in $@; do | |
echo "$group:" | |
users=$(awk -F: "/^$group/{print \$4}" /etc/group | tr , \\n | sort) | |
if [ "$users" != "" ]; then | |
for user in $users; do | |
echo " $user" | |
done | |
else | |
echo " <no users in this group>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
on_exit() { | |
echo "#Exited unexpectidly" | |
zenity --display=:0 --error --text="Program has exited unexpectidly!" | |
} | |
exec &> >(zenity --display=:0 --progress --title 'Redirection example' --text 'Running...' --auto-close) | |
trap "on_exit" EXIT |
NewerOlder