Skip to content

Instantly share code, notes, and snippets.

View elsmr's full-sized avatar
✌️

Elias Meire elsmr

✌️
View GitHub Profile
@elsmr
elsmr / catdog_example_oas.json
Created March 19, 2021 13:20
Cat/dog example for IBM/openapi-to-graphql
{
"openapi": "3.0.0",
"info": {
"title": "Example",
"description": "Example",
"version": "1.0.0"
},
"paths": {
"/cat123": {
"get": {
@elsmr
elsmr / petstore_after.graphql
Last active March 18, 2021 11:14
PetStore OpenAPI spec with x-graphql extensions
type Query {
"""
Get user by user name
Equivalent to GET /user/{username}
"""
customUserByName(
"""The name that needs to be fetched. Use user1 for testing. """
username: String!
): User
@elsmr
elsmr / app.compiled.js
Created March 8, 2017 18:49
webpack compiled constants: indiv. exports
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return VERSION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return PUBNUB_SUBSCRIBE_KEY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return LOCALSTORAGE_VIEWMODEKEY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return URL_BASE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return API_BASE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SENTRY_URL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return PDF_JS_RESOURCES_PATH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return ASSET_ICON_MAPPING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_expor
@elsmr
elsmr / app.compiled.js
Last active March 8, 2017 18:47
webpack compiled constants: class version
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CONSTANTS; });
var SCHEMA = __webpack_require__(183).default;
var VERSION = __webpack_require__(1256).version;
var CURRENT_HOST = window.location.protocol + "//" + window.location.host;
var BADGE_ICON_PREFIX = "badge-";
var CONSTANTS = (function () {
function CONSTANTS() {
}
CONSTANTS.VERSION = VERSION;
CONSTANTS.PUBNUB_SUBSCRIBE_KEY = window.__env.PUBNUB_SUBSCRIBE_KEY;

1. ptimmers

grep -E '^.{10,}$' rockyou.txt  | grep -E '^[a-zA-Z0-9_]+$' | grep -E '[[:upper:]]{1,}' | grep -E '[[:lower:]]{1,}' | grep -E '[[:digit:]]{1,}' > filtered.txt
unshadow passwd shadow > ptimmers
john --rules ptimmers --wordlist=/home/elias/filtered.txt

2. msas

Geef de naam en de prijs van de meest verkochte optie. Geef tevens ook het aantal keren dat deze optie verkocht werd (in dezelfde query).
SELECT naam, prijs, count(autos_chassisNR) AS aantal
FROM opties
INNER JOIN autos_has_opties ON opties_id=id
GROUP by opties_id
ORDER BY aantal DESC limit 1;
Geef het aantal verschillende modellen van auto’s die verkocht werden door verkoper Bram.
SELECT COUNT(DISTINCT model) AS aantal_versch_modellen