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 | |
# bash ./gitlab_scraper.bash <your gitlab private token> <gitlab instance base> | |
# make sure you have jq and git installed | |
# use ssh_url_to_repo instead of http_url_to_repo to clone with ssh scheme | |
PRIVATE_TOKEN=$1 | |
GITLAB_BASE=$2 | |
# Gitlab do not have an endpoint that return total user count. | |
# so we have to manually instruct the script to crawl given PAGE_COUNT of users. | |
PAGE_COUNT=114514 | |
for (( page=1; page<=$PAGE_COUNT; page++ )); do |
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 json | |
import sys | |
SLIENT = "set silent=on;\n" | |
DROP_TABLE_TEMPLATE = "DROP TABLE IF EXISTS {};\n" | |
CREATE_TABLE_TEMPLATE = """ | |
create EXTERNAL TABLE {} ( | |
{} | |
) | |
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' |
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
CONNECT | |
DELETE | |
GET | |
HEAD | |
OPTIONS | |
PATCH | |
POST | |
PUT | |
TRACE |
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
(netsh wlan show profiles) | ` | |
Select-String ":(.+)$"| ` | |
%{$name=$_.Matches.Groups[1].Value.Trim(); $_} | ` | |
%{(netsh wlan show profile name=$name key=clear)} | ` | |
Select-String "Key Content\W+\:(.+)$" | ` | |
%{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | ` | |
%{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | ` | |
Format-Table -AutoSize |
NewerOlder