Skip to content

Instantly share code, notes, and snippets.

View RafPe's full-sized avatar
🎯
Focusing

Rafal Pieniazek RafPe

🎯
Focusing
View GitHub Profile
@RafPe
RafPe / jq-cheetsheet.md
Created September 10, 2022 21:27 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@RafPe
RafPe / nginx.conf
Created July 30, 2022 19:34 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@RafPe
RafPe / cloudflare-purge-cache-service-worker.js
Created November 18, 2021 12:41 — forked from vdbelt/cloudflare-purge-cache-service-worker.js
A CloudFlare service worker that proxies purge cache requests. Example: https://example.com/__purge_cache?zone=XX
addEventListener('fetch', event => {
event.respondWith(purgeCache(event.request))
})
async function purgeCache(request) {
const url = new URL(request.url)
@RafPe
RafPe / create-aws-console-user.sh
Created May 21, 2021 08:21 — forked from res0nat0r/create-aws-console-user.sh
Create AWS console user from the awscli
#!/bin/bash
# USAGE: ./create-aws-console-user.sh $GROUPNAME $USERNAME $PASSWORD
# http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi
# Create administrator group
aws iam create-group --group-name $1
@RafPe
RafPe / mutt_notes.markdown
Created March 25, 2021 07:21 — forked from markjlorenz/mutt_notes.markdown
Notes on getting Mutt running on OSX
  • brew install mutt
  • setup an app password for mutt in gmail
  • setup an app password for imap_notifier in gmail
  • brew install terminal-notifier terminal-notifier
  • gem install imap_notifier imap_notifier
  • brew install urlview
  • brew install w3m (links would be OK too)
  • Install pandoc to author in markdown and send as HTML

~/.muttrc

@RafPe
RafPe / MailinatorAliases
Created October 15, 2020 15:37 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@RafPe
RafPe / ca.md
Created January 8, 2020 10:53 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@RafPe
RafPe / 1-setup.md
Created December 27, 2019 10:18 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@RafPe
RafPe / android_instructions_23.md
Created November 24, 2018 21:47 — forked from agrcrobles/android_instructions_29.md
Setup Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

Enroll via Auth API

Primary Authentication

POST https://your-domain.okta.com/api/v1/authn

{
  "username": "isaac@example.org",
  "password": "GoAw@y123",