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 | |
# dependencies: | |
# - imagemagick | |
# - xdotool | |
function screenshot() { | |
local timestamp=$(date "+%Y-%m-%d_%H-%M-%S") | |
local path="$HOME/Pictures/screenshot_${timestamp}.png" | |
for i in $(seq 5); do echo "$(printf '%0.s·' $(seq $i))" && sleep 1; done && | |
import -window "$(xdotool getwindowfocus -f)" "${path}" |
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
# .bashrc | |
# following script produces colorized PS1: | |
# [user@machine]::[git_repo](branch[changed_files_number]::latest_commit)$ | |
git_branch() { | |
git rev-parse --abbrev-ref HEAD | |
} | |
git_commit() { | |
git rev-parse --short HEAD | |
} |
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
module StateMachine | |
class AuthAgent | |
def initialize | |
@state = nil | |
end | |
def next_state(klass = Default) | |
@state = klass.new(self) | |
@state.describe | |
@state.change_auth | |
end |
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
# check if credential-osxkeychain is installed | |
git credential-osxkeychain | |
#if not installed | |
git credential-osxkeychain | |
# Test for the cred helper | |
# git: 'credential-osxkeychain' is not a git command. See 'git --help'. | |
curl -s -O \ | |
https://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain | |
# Download the helper |
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
curl -H "Authorization: token 0auth token" https://api.github.com/orgs/vcita/members\?filter\=2fa_disabled | |
{ | |
"message": "Only owners can use this filter.", | |
"documentation_url": "https://developer.github.com/v3/orgs/members/#audit-two-factor-auth" | |
} |