Discover gists
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
https://github.com/nuvious/pam-duress | |
A Pluggable Authentication Module (PAM) which allows the establishment of alternate passwords that can be used to perform actions to clear sensitive data, notify IT/Security staff, close off sensitive network connections, etc if a user is coerced into giving a threat actor a password. | |
https://github.com/uber/pam-ussh | |
uber's ssh certificate pam module | |
https://github.com/Yubico/yubico-pam | |
Yubico Pluggable Authentication Module (PAM) | |
https://github.com/hamzasood/pam_touchid |
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
#!/usr/bin/env python3 | |
from decimal import Decimal | |
import re | |
import yaml | |
from yaml.composer import Composer | |
from yaml.constructor import SafeConstructor | |
from yaml.parser import Parser | |
from yaml.reader import Reader | |
from yaml.resolver import BaseResolver, Resolver as DefaultResolver |
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
#!/usr/bin/env bash | |
0x0() { | |
case "${1}" in | |
"s") | |
shift | |
local url=`curl --silent -F"shorten=${1}" https://0x0.st | sed 's/\n//'` | |
echo -n "${url}" | |
;; | |
"u") |
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
library(tidyverse) | |
library(MASS) | |
library(patchwork) | |
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") | |
# generate data with given cor matrix | |
a <- 0.9 | |
s1 <- matrix(c(1,a, | |
a,1), ncol = 2) |
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
from enum import Enum | |
import time | |
TEMP_PATH = "/sys/devices/virtual/thermal/thermal_zone0/temp" | |
FAN_PATH = "/sys/class/thermal/cooling_device0/cur_state" | |
class FanSpeed(Enum): | |
OFF = 0 | |
LOW = 1 |
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
;; How to translate LSP configuration examples into Eglot’s format: | |
;; | |
;; Usually LSP servers will say something like | |
;; | |
;; rust-analyzer.procMacro.attributes.enable (default: true) | |
;; | |
;; Translate that into a JSON LSP configuration, you get | |
;; | |
;; { | |
;; "rust-analyzer": { |
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
a4b.amazonaws.com | |
access-analyzer.amazonaws.com | |
account.amazonaws.com | |
acm-pca.amazonaws.com | |
acm.amazonaws.com | |
airflow-env.amazonaws.com | |
airflow.amazonaws.com | |
alexa-appkit.amazon.com | |
alexa-connectedhome.amazon.com | |
amazonmq.amazonaws.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
Following this article: | |
http://thealarmclocksixam.wordpress.com/2013/01/06/git-repo-tutoria/ | |
http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/ | |
http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server | |
# SSH Server configuration | |
The machine that will host the git repository needs to be accessed by clients. A possible way to access a machine remotely is through SSH. |
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 boto3 | |
def pull_s3_prefix(dst_dir, bucket, prefix): | |
client = boto3.client('s3') | |
resource = boto3.resource('s3') | |
download_dir(client, resource, prefix, prefix, dst_dir, bucket) | |
def download_dir(client, resource, prefix, start_prefix, local, bucket ): | |
paginator = client.get_paginator('list_objects') | |
for result in paginator.paginate(Bucket=bucket, Delimiter='/', Prefix=prefix): |
NewerOlder