Skip to content

Instantly share code, notes, and snippets.

View SethCalkins's full-sized avatar

Seth Calkins SethCalkins

View GitHub Profile
@SethCalkins
SethCalkins / LittleSnitch_Block_List.md
Last active January 5, 2023 05:17
Little Snitch Script to block Ad Servers

Here is a script to take the hosts from From http://pgl.yoyo.org/adservers/ and convert them to rules for Little Snitch.

It has options to grab the entire list or grab new entries past a certain date.

Just grab the output and copy/paste into Little Snitch.

The script is written to block access to any process, any port. You can also delete those lines and it will only block Mail. Or use the options to enter any process, port or protocol you want to block.

Source

The best way to store your dotfiles: A bare Git repository

Disclaimer: the title is slightly hyperbolic, there are other proven solutions to the problem. I do think the technique below is very elegant though.

Recently I read about this amazing technique in an [Hacker News thread][1] on people's solutions to store their [dotfiles][2]. User StreakyCobra [showed his elegant setup][3] and ... It made so much sense! I am in the process of switching my own system to the same technique. The only pre-requisite is to install [Git][4].

In his words the technique below requires:

@SethCalkins
SethCalkins / powerlevel9k.config
Created September 1, 2018 20:53 — forked from athityakumar/powerlevel9k.config
Powerlevel9k oh-my-zsh theme configuration for screenshots used in https://github.com/athityakumar/colorls
export ZSH=$HOME/.oh-my-zsh
export DEFAULT_USER='athityakumar'
TERM=xterm-256color
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
#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'
{
@SethCalkins
SethCalkins / PNI_Calkins.sql
Created March 5, 2018 17:05
PNI_SCalkins_Project
CREATE TABLE IF NOT EXISTS account (
id integer PRIMARY KEY AUTOINCREMENT,
username text COLLATE NOCASE NOT NULL,
service text NOT NULL,
name text COLLATE NOCASE,
name_update_date integer
);
CREATE INDEX IF NOT EXISTS username_index ON account (username);
@SethCalkins
SethCalkins / README.MD
Created February 7, 2018 14:19 — forked from giordanocardillo/README.MD
Remove Office 2016 Product Key
  1. Open a command prompt as Administrator
  2. In the command prompt, type the following:
  • Office 2016 (32-bit) on a 32-bit version of Windows

    cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (32-bit) on a 64-bit version of Windows

    cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (64-bit) on a 64-bit version of Windows

@SethCalkins
SethCalkins / .md
Created December 11, 2016 07:37
Fix for .app "is damaged and can't be opened"

This is a fix for MAC OS Complaining about Damaged App

Run Following on Application

Example

xattr -rc /Applications/MyApp.app
@SethCalkins
SethCalkins / Phil Delong 2017-12-16 1-of-96 .txt
Created December 29, 2017 21:41
Phil Delong 2017-12-16 1-of-96.txt
Chat on 12/16/17 at 7:09 AM
(7:09 AM) Lindsay Welch: Well I feel like a wuss because I’m nervous to be in the dark going in early.
(7:09 AM) Phil Delong: Are you there yet?
(7:09 AM) Lindsay Welch: Not yet
(7:10 AM) Phil Delong: I won’t ask you to do this again, I feel bad that you’re nervous.
(7:11 AM) Lindsay Welch: You didn’t ask me.
(7:12 AM) Lindsay Welch: I’d like to be comfortable to go in early regularly because I need to get shit done
(7:13 AM) Phil Delong: I certainly know that feeling. Well I’m here so you aren’t alone, just do what I said before you go in.
(7:14 AM) Lindsay Welch: Did you get some sleep?
@SethCalkins
SethCalkins / ssl_setup_example.sh
Created November 26, 2017 04:51 — forked from mlawrie/ssl_setup_example.sh
Create an SSL Certificate Signing Request on OSX with wildcard and alternate names
# First, generate the key. You will be prompted to enter a password, but we will strip it out in the next step:
openssl genrsa -des3 -out server.orig.key 2048
# Then, stip out the password:
openssl rsa -in server.orig.key -out server.key
# Edit the OSX openssl config file to include your alternate names.
# Edit the 'subjectAltName' field. E.g.:

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