This file contains hidden or 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
#!/usr/bin/env bash | |
sophosPID=$(ps -ax | grep Sophos | awk '{print $1}') | |
kill -9 $sophosPID |
This file contains hidden or 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 | |
sophosPID=$(ps -ax | grep Sophos | awk '{print $1}') | |
kill -9 $sophosPID | |
sudo rm -R /Library/Sophos\ Anti-Virus/ | |
sudo rm -R /Library/Application\ Support/Sophos/ | |
sudo rm -R /Library/Preferences/com.sophos.* | |
sudo rm /Library/LaunchDaemons/com.sophos.* | |
sudo rm /Library/LaunchAgents/com.sophos.* |
This file contains hidden or 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 UIKit | |
// Requires iOS 11+ / macOS 10.13+ | |
extension ISO8601DateFormatter { | |
static var ISO8601WithFractionalSeconds: ISO8601DateFormatter { | |
let formatter = ISO8601DateFormatter() | |
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] | |
return formatter | |
} |
This file contains hidden or 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
#!/usr/bin/env sh | |
# Usage: | |
# suffmv fromext toext files... | |
# | |
# Changes the suffix from `fromext` to `toext`. Adds suffix `toext` if the file | |
# didn't have the suffix `fromext` | |
# | |
# Examples: | |
# suffmv .c .old main.c foo.c bar.c | |
# suffmv .c .c.old *.c |
This file contains hidden or 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
#!/usr/bin/env sh | |
# Usage: | |
# prefmv frompref topref files... | |
# | |
# Changes the prefx from `frompref` to `topref`. Adds prefix `topref` if the file | |
# didn't have the prefix `frompref` | |
# | |
# Examples: | |
# prefmv main oldmain main.c main.java main.cpp | |
# prefmv main oldmain main* |
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Generate an MFA TOTP token. Secret keys are stored in your ~/.mfa directory | |
# | |
# Requires oathtool: http://www.nongnu.org/oath-toolkit/man-oathtool.html | |
# | |
# Example: I might have the following... | |
# $ cat ~/.mfa/aws.mfa | |
# ASDLJGJ893AS7JJF83NLSD9RTSMF81NSLA85SNSA81MASNFHG75KAKSKJV0192F7 | |
# |
This file contains hidden or 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 java.math.BigDecimal | |
import java.text.NumberFormat | |
import java.util.Currency | |
import java.util.Locale | |
fun main(args: Array<String>) { | |
val locales = listOf( | |
Locale.FRANCE, | |
Locale.GERMANY, | |
Locale.UK, |
This file contains hidden or 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
#!/usr/bin/env bash | |
stopcouch | |
rm -rf ~/couchbase |
This file contains hidden or 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
/** | |
* Copyright 2018 C.J. Campo | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains hidden or 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
/** | |
* Copyright 2018 C.J. Campo | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |