Skip to content

Instantly share code, notes, and snippets.

Nick Semenkovich semenko

Block or report user

Report or block semenko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6ce1c3f4c50c0928a55f53f40c8b9e5b
Inbound audio stream
Speech level
-61 dB
Noise level
-61 dB
Outbound audio stream
Speech level
-36 dB
Noise level
@semenko
semenko / tcpdump.sh
Created May 23, 2017
tcpdump on span interface
View tcpdump.sh
#!/bin/bash
if [ ! $(pidof tcpdump) ]; then
echo "Starting tcpdump"
/usr/sbin/tcpdump -i eth0 -n -W 1000 -G 3600 -z gzip -w /var/www/traffic-logs/%m-%d-%y-%H:00.pcap >/dev/null 2>&1 &
else
echo "already running"
fi
# That 1000 doesn't really work. Maybe gzip bug.
@semenko
semenko / build-samba.sh
Created May 23, 2017
Build samba from git
View build-samba.sh
#!/bin/bash
export PATH="/usr/lib/ccache:$PATH"
die() { echo "$@" 1>&2 ; exit 1; }
if [ -z $1 ]; then
die "Run with a git tag, e.g.: $0 v4-2-test"
fi
echo "Updating samba4 to tag '$1'"
@semenko
semenko / SetupFoldersForOneDrive.ps1
Last active Aug 15, 2019
Powershell Redirect Folders to OneDrive Account & Sync
View SetupFoldersForOneDrive.ps1
# Work in progress!
# Derived from http://stackoverflow.com/questions/25709398/set-location-of-special-folders-with-powershell
<#
.SYNOPSIS
Sets a known folder's path using SHSetKnownFolderPath.
.PARAMETER Folder
The known folder whose path to set.
.PARAMETER Path
The path.
@semenko
semenko / gist:cf8945fa4e2acc553d6bdc758a291a31
Created Feb 12, 2017
Gmail / Google Scripts, One Year Auto-Delete Mail Script
View gist:cf8945fa4e2acc553d6bdc758a291a31
// Open Google Drive, create a new document, and add a script
// Purge messages automatically after how many days?
var PURGE_AFTER = "365";
function purgeGmail() {
var age = new Date();
age.setDate(age.getDate() - PURGE_AFTER);
@semenko
semenko / Office-2013-EnableADAL.reg
Created Jan 21, 2017
Enable Modern Auth in Office 2013 - Registry File
View Office-2013-EnableADAL.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Identity]
"Version"=dword:00000001
"EnableADAL"=dword:00000001
View Office 365 Security and Compliance
Here is the list of largely undocumented Office 365 MDM PowerShell commands:
CommandType Name Version Source
----------- ---- ------- ------
Function Add-ComplianceCaseMember 1.0 tmp_00mf4ap5.eg0
Function Add-eDiscoveryCaseAdmin 1.0 tmp_00mf4ap5.eg0
Function Add-RoleGroupMember 1.0 tmp_00mf4ap5.eg0
Function Get-ActivityAlert 1.0 tmp_00mf4ap5.eg0
Function Get-AdminAuditLogConfig 1.0 tmp_00mf4ap5.eg
@semenko
semenko / gist:3d66de1b37beb65fc5ce48ddb893c956
Last active Jan 7, 2017
OnHub / Google Wifi diagnostic url notes
View gist:3d66de1b37beb65fc5ce48ddb893c956
Onhub urls:
onhub.here internally resolves to the router (always 192.168.86.1)
http://onhub.here/api/v1/status
http://onhub.here/api/v1/welcome-mat
http://onhub.here/api/v1/connected-devices
http://onhub.here/api/v1/diagnostic-report <-- protobuf with gzipped chunks
View gist:88f5c20cc0cf36e4529be7325e16bcea
### Keybase proof
I hereby claim:
* I am semenko on github.
* I am semenko (https://keybase.io/semenko) on keybase.
* I have a public key whose fingerprint is FF4D D3EC 3ADD 5006 6246 1007 06F5 B6F6 DBBB 3C45
To claim this, I am signing this object:
View git-status-tester.sh
#!/bin/sh
# Author: Nick Semenkovich <semenko@alum.mit.edu>
git remote update >/dev/null 2>&1
gitstatus=`git log master..origin/master`
if [ "$gitstatus" ]
then
if tty -s
You can’t perform that action at this time.