Skip to content

Instantly share code, notes, and snippets.

View bitnot's full-sized avatar
👁️
~

Pavel bitnot

👁️
~
View GitHub Profile
@bitnot
bitnot / pleasant-export.py
Created September 4, 2020 15:44
Export passwords from "Pleasant Password Server" web API.
import requests, json
# Look for TODO's
YOUR_TREE_ID='<TODO: put your tree UUID from /WebClient/Main/GetTree request>'
YOUR_PPS_HOST='TODO.put.your.host.com'
BASE_URL = 'https://' + YOUR_PPS_HOST
GET_PASS='/WebClient/Main/CopyPasswordPopup?credentialId={}'
GET_GROUP='/WebClient/CredentialListGrid/Select?CredentialGroupId={}'
acr0.samsungcloudsolution.com
ad.samsungadhub.com
auth.samsungosp.com
az43064.vo.msecnd.net
cdn.samsungcloudsolution.com
Coordinator-Production-28516768.us-east-1.elb.amazonaws.com
d179kwmlpc4o47.cloudfront.net
d1oxlq5h9kq8q5.cloudfront.net
d2tnx644ijgq6i.cloudfront.net
d3mjsomixevyw7.cloudfront.net
@bitnot
bitnot / not_ok.js
Last active August 5, 2020 19:08
Decline (most of) `consentmanager` cookies (ok.ru)
$('img[src="https://cdn.consentmanager.mgr.consensu.org/delivery/btns/btns0/yes.svg"]').click()
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
(function() {
const element = document.querySelector('#test-layout-styles');
if (element) {
document.head.removeChild(element);
} else {
const style = document.createElement('style');
style.id = 'test-layout-styles';
style.innerHTML = `
@bitnot
bitnot / kmsdecode.sh
Created April 8, 2019 15:11
Decrypt Base64-encoded KMS secret. Output base-64 encoded plaintext value.
alias kmsdecode='f(){aws kms decrypt --ciphertext-blob fileb://<(echo $1 | base64 --decode) --output text --query Plaintext }; f'
@bitnot
bitnot / fix_spotlight.sh
Last active November 21, 2018 12:53
Blacklist dev dirs from indexing with Spotlight
find ~/gits -type d \( -name "node_modules" -o -name "bower_modules" -o -name "target" -o -name ".git" -o -name ".idea" \) -exec touch "{}/.metadata_never_index" \;
# https://apple.stackexchange.com/questions/247019/prevent-spotlight-from-indexing-folders-with-a-certain-name
@bitnot
bitnot / in-group.ps
Created September 13, 2018 07:16
Checks whether user is in AD group(s)
Import-Module ActiveDirectory #[Install Remote Server Administration Tools](https://stackoverflow.com/questions/19182497)
$groups = @(
"Administrators",
"XX-ProductOwners",
"XX-Developers"
)
$members = @{}
Function CheckGroups ($user = "Someuser") {
@bitnot
bitnot / DisplayLinkRestart.sh
Created September 13, 2018 07:13
Restart DisplayLink to unfreeze monitors on Mac
ps -A | grep [D]isplayLink | awk '{print $1}' | xargs sudo kill -9
@bitnot
bitnot / UpdateAgodaPackages.ps1
Created September 13, 2018 07:10
Update Nuget packages by prefix
Get-Package | Where Id -like "YourCompany*" | Sort-Object -Property Id -Unique | foreach { Update-Package $_.Id }
@bitnot
bitnot / myip.sh
Created September 13, 2018 07:08
Gets first IP address of your network interface(s)
MYIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -n 1`
echo $MYIP