Skip to content

Instantly share code, notes, and snippets.

Radosław Mejer radmen

Block or report user

Report or block radmen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
radmen /
Created Apr 30, 2019
NordVPN + Docker
#!/usr/bin/env bash
# Make sure we're always getting the standard response strings
case "${INTERFACE}-${STATUS}" in
View gist:1954f970ae0e106320144b28e4693511
const deepEql = require('deep-eql')
const input = require('./input.json')
const output = require('./output.json')
const groupByDate = (messages) => messages.reduce(
(carry, message) => {
const copy = Array.from(carry)
const tail = copy.pop();
const groupDate = new Date(message.created_at).getDate();
radmen /
Last active Jul 18, 2018
Simple AFK script

This simple Bash function will post a short message to #afk Slack channel.

After posting the message it will wait for user interaction on which it will post a message that the user returned.

To run it:

  1. generate legacy token for selected workspace
  2. add it to declaration of TOKEN variable
  3. import somewhere (eg .bash_aliases) function from file
radmen /
Last active Jun 27, 2018
Python: export selected env variables
#!/usr/bin/env python
import argparse
import os
parser = argparse.ArgumentParser(description='Export selected env variables.')
parser.add_argument('name', nargs='+',
help='name of env variable')
radmen / gist:22139e20d0bdb2f9d95bb98f093a521d
Last active Mar 6, 2018
Promise/Future Result Maybe object!
View gist:22139e20d0bdb2f9d95bb98f093a521d

The task

  1. get something from a remote site (loadPage())
  2. find specific element (findElement())
  3. grab and parse contents as JSON (extractJson())

stage 1

Easy way: grab page and return result

radmen / .bash_aliases
Created Feb 8, 2016
Include `.env` file and connect to MySQL
View .bash_aliases
# connect to mysql using .env file
env-mysql ()
yellow=$(tput -Txterm setaf 3)
lt_blue=$(tput -Txterm setaf 6)
reset=$(tput -Txterm sgr0)
if [ -f .env ]; then
. .env
radmen / current_route.php
Created Oct 7, 2015
Lument getCurrentRoute()
View current_route.php
$routeToRegex = function ($string) use ($verbs) {
$string = preg_replace("/^({$verbs})/", '', $string);
$string = preg_replace('/\{\w+\}/', '\w+', $string);
$string = preg_replace('/\{(\w+):(.+?)\}/', '\2', $string);
return '#^'.$string.'$#';
radmen /
Created Jun 10, 2014
gulp-order modified test case
order = require "../src"
path = require "path"
{ File } = require "gulp-util"
{ expect } = require "chai"
require "mocha"
newFile = (filepath, base) ->
cwd = "/home/johndoe/"
unless base

Keybase proof

I hereby claim:

  • I am radmen on github.
  • I am radmen ( on keybase.
  • I have a public key whose fingerprint is 12A2 C89B 8C68 94E8 3EFB 309A 8D55 6BB6 D7E3 7BE8

To claim this, I am signing this object:

radmen /
Last active Dec 16, 2015
Bypass BZWBK masked password input scriptlet

Ten skrypt w prosty sposób obchodzi maskowanie hasła dla (BZWBK).

  • Dodaj do zakładek zawartość scriptlet.js
  • Przejdź na stronę logowania -
  • Wpisz numer NIK, wciśnij Dalej
  • Uruchom skryptozakładkę
  • Pod polem do wpisania PINu pojawi się nowy textbox - wpisz w nim swój pin i wciśnij ENTER
  • Twoje hasło powinno zostać wpisane w odpowiednie pola
  • Wciśnij button Dalej
You can’t perform that action at this time.