Skip to content

Instantly share code, notes, and snippets.

@eyalzek
eyalzek / .env
Created December 14, 2022 10:42
Python wrapper to make request to IAP protected sites using external ID token
export GCIP_KEYCLOAK_URL=
export GCIP_KEYCLOAK_USER=
export GCIP_KEYCLOAK_PASSWORD=
export GCIP_KEYCLOAK_CLIENT_ID=
export GCIP_KEYCLOAK_CLIENT_SECRET=
export GCIP_GOOGLE_API_KEY=
export GCIP_EXTERNAL_PROVIDER_ID=

Keybase proof

I hereby claim:

  • I am eyalzek on github.
  • I am eyalzek (https://keybase.io/eyalzek) on keybase.
  • I have a public key ASCZoBYmtM6ueOomDk1g3bTtf88ciG2jPkrdAUY8hKsXCQo

To claim this, I am signing this object:

00:12:36.904 [@C] #########################
00:12:36.904 [@C] { Error: A session id is required for this command but wasn't found in the response payload
00:12:36.905 [@C] type: 'NoSessionIdError',
00:12:36.905 [@C] message: 'A session id is required for this command but wasn\'t found in the response payload',
00:12:36.906 [@C] uncaught: true }
00:12:36.906 [@C] #########################
00:12:36.907 [@C] 2) "before each" hook
00:12:36.907 [@C]
00:12:36.908 [@C] Suite duration: 26.48 s, Tests: 6
00:12:36.908 [@C] **********************
#!/usr/bin/env python
import os
import re
import time
from slackclient import SlackClient
client = SlackClient(os.environ['SLACK_BOT_TOKEN'])
match_pattern = 'from (.*)(>|>)'
@eyalzek
eyalzek / 1-import-cluster
Last active January 2, 2017 10:56
Opscenter setup
curl -XPOST http://localhost:8888/cluster-configs -d '{
"cassandra": {
"cql_port": 9042,
"seed_hosts": ""
},
"jmx": {
"port": "7199"
}
}'
---
driver:
name: vagrant
driver_config:
require_chef_omnibus: 12.16.42
provisioner:
name: chef_zero
#!/bin/bash -ex
ENV=staging
for resource in `terraform state list -state=terraform.tfstate |grep $ENV`
do
echo $resource
terraform state mv -state=terraform.tfstate -state-out="$ENV-test.tfstate" $resource $resource
done
# rm *.backup
#!/usr/bin/env python
import re
import json
import pprint
import argparse
import logging
import urlparse
import requests
from copy import deepcopy
@eyalzek
eyalzek / index.html
Last active April 21, 2016 07:25
getCssProperty character case issue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div class="test" style="background-image: url(http://NoNeXiStEnT)"></div>
</body>
</html>
@eyalzek
eyalzek / example.js
Created April 7, 2016 11:26
selenium exception
var webdriverio = require('webdriverio');
var options = { desiredCapabilities: { browserName: 'chrome' }, logLevel: 'verbose' };
var client = webdriverio.remote(options);
client
.init()
.windowHandleSize({width: 1920, height: 1080})
.url('https://showbox.com/workspace.html')
.waitForExist('.login button[data-modal="signup"]', 10000)
.click('.login button[data-modal="signup"]')