Skip to content

Instantly share code, notes, and snippets.

View SethCalkins's full-sized avatar

Seth Calkins SethCalkins

View GitHub Profile
#requires -Version 4.0
<#
Author: Luke Murray (Luke.Geek.NZ)
Version: 0.1
Purpose: Windows Server 2016 Baseline Hardening using DSC per DoD DISA STIG recommendations 22/06/18.
#>
Configuration 'Server2016'
{
@whitehotlogic
whitehotlogic / Microsoft-CLI-Notes.md
Last active August 17, 2018 14:47
Generic Microsoft Server + Desktop CLI Troubleshooting Cheatsheet

Microsoft Troubleshooting -- CLI Notes

(for Windows Workstations & Servers)

1. General

2. Networking

3. Task Management

4. Hard Drive Diagnosis / Repair

5. Windows Corruption Diagnosis / Repair

6. Control Panel Applet & MMC Shortcuts

@michielboekhoff
michielboekhoff / _sig.js
Created February 27, 2017 09:36
YouTube downloader
_sig = function(H) {
var U = "R3",
m3 = "round",
e3 = "B3",
D3 = "v3",
N3 = "I3",
g3 = "V",
K3 = "toLowerCase",
n3 = "substr",
z3 = "Z",
@matejskubic
matejskubic / wifipass.bat
Created February 6, 2017 08:40
Windows 10 WiFi password
netsh wlan show profiles
netsh wlan show profiles name="%1" key=clear
@pchhetri
pchhetri / README.md
Last active November 11, 2024 02:05
OS X iMessage (Messages) database merger

OS X iMessage (Messages) database merger

Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.

Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages, the folder contents will look like as follows:

  • chat.db
@jonschlinkert
jonschlinkert / open-iterm-from-finder.md
Last active July 11, 2024 21:42
Add an icon to your finder toolbar to open iTerm in the current folder.

Open iTerm from finder

The code and instructions in this gist are from http://peterdowns.com/posts/open-iterm-finder-service.html. I've had to do this a few times and wanted to distill it the basics.

  1. Open Automator
  2. Create an Application
  3. Choose Actions > Utilities > Run Applescript
  4. Paste the contents of open_in_iterm.app into the window.
  5. Save the script somewhere convenient
  6. Find the script, then drag the script onto the Finder window while holding the command key (or in Yosemite, the command + option keys)
@mattclements
mattclements / function.php
Last active October 29, 2024 22:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
anonymous
anonymous / sublime_text3_crack.md
Created June 7, 2015 04:58
Sublime Text 3092 3083 latest crack Win32 Win64 Linux64 Linux32 OSX Mac MacOS

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
@tresni
tresni / gist:83b9181588c7393f6853
Last active September 7, 2024 02:35
Authy to 1Password

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active November 17, 2023 06:53
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .