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
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
# if no namespace was passed, then get the currently selected namespace | |
ns=$(kubectl config get-contexts | awk '$1 == "*" {print $5}') | |
else | |
ns=$1 | |
fi | |
# get the rolebinding for the response matching ROLE = "Role/edit" |
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 json | |
import requests | |
import os | |
from requests.auth import HTTPBasicAuth | |
org = 'your-org' | |
project = 'your-project' | |
# the variableGroupId values from the variable libs that | |
# you want to compare |
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 bs4 import BeautifulSoup | |
import requests | |
import collections | |
currencies = [] | |
Currency = collections.namedtuple('Currency', 'country usd') | |
sd = requests.get("https://www.x-rates.com/table/?from=USD&amount=1") | |
sp = BeautifulSoup(sd.content, 'html.parser') | |
table = sp.find('table', {"class": "tablesorter ratesTable"}) |
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
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const url = 'https://www.infoplease.com/us/postal-information/state-abbreviations-and-state-postal-codes'; | |
axios.get(url).then(response => { | |
const $ = cheerio.load(response.data); | |
$('table.sgmltable tr').each((i, elem) => { | |
const children = $(elem).children() | |
const stateName = $(children[0]).text(); |
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
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const url = 'https://www.x-rates.com/table/?from=USD&amount=1'; | |
axios.get(url).then(response => { | |
const $ = cheerio.load(response.data); | |
$('table.ratesTable tr').each((i, elem) => { | |
const children = $(elem).children() | |
const country = $(children[0]).text(); |
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
#!/bin/bash | |
# Dependencies: | |
# JQ: https://stedolan.github.io/jq/download/ | |
# if Linux, you'll need xclip: sudo apt install xclip. | |
# if OSX, then pbpaste is already there. | |
# To use this tool, just save it on your system and make | |
# it executable. Then, if you have copied a base64 encoded | |
# JWT, then you can simply execute this from a command prompt |
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
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" | |
exclude-result-prefixes="soapenv"> | |
<xsl:strip-space elements="*"/> | |
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> | |
<!-- remove all elements in the soapenv namespace --> |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"github.com/360EntSecGroup-Skylar/excelize" | |
"io/ioutil" | |
"net/http" | |
"os" |
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
const Jimp = require("jimp"); | |
let data = "Dev"; | |
if (process.argv.length > 2) { | |
data = process.argv[2]; | |
} | |
var fileName = 'ic_launcher.png'; | |
var imageCaption = `[${data}]`; |
NewerOlder