Skip to content

Instantly share code, notes, and snippets.

View vassyz's full-sized avatar
♦️

Sebastian Zaremba vassyz

♦️
View GitHub Profile
@CKolkey
CKolkey / Gemfile.dev
Last active March 14, 2024 15:44
Using personal gems with Bundle without bothering your colleagues.
# NOTE: When updating gems, the ENV var below will need to be _unset_, so bundler updates the correct lock file.
# NOTE 2: The name 'Gemfile.dev' isn't important - it could be `dev_gems.rb` or anything else.
# SETUP:
# - Set the ENV var: BUNDLE_GEMFILE=Gemfile.dev in your app dir
# - Add Gemfile.dev and Gemfile.dev.lock to your .gitignore (global or local)
# - Copy the rest of this gist into Gemfile.dev (in your project root):
# Copy real lock file to ensure it gets priority
@mabenson00
mabenson00 / cheatsheet.rb
Last active May 3, 2024 22:40
Rails ActiveRecord JSON cheatsheet
# Basic key operators to query the JSON objects :
# #> : Get the JSON object at that path (if you need to do something fancy)
# -> : Get the JSON object at that path (if you don't)
# ->> : Get the JSON object at that path as text
# {obj, n} : Get the nth item in that object
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE
# Date
# date before today
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active April 2, 2024 08:21
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@dieechtenilente
dieechtenilente / pihole.list
Last active October 19, 2023 19:52
Blocks many bad domains (pihole, host list, ...)
#
#
#
#
#
# Please use this blocklist: https://github.com/dieechtenilente/hostlist
#
#
#
#
@paulgrav
paulgrav / kibana_azuread.md
Last active September 10, 2023 08:54
Setting up Azure AD OpenID Connect with Kibana

Enabled Azure AD with Kibana

1. Configure Elasticsearch

As a pre-requisite we need to register a new app in Azure AD, note down some properties, and generate a Client Secret.

  1. Register an app in Azure Active Directory.
  2. Note its Application (client) ID
  3. Note the Directory (tenant) ID
  4. Generate a New Client Secret.
@bneff84
bneff84 / pre-request-script.js
Last active April 3, 2024 03:32
Postman WSSE Header Generation Pre-request Script (Tailored for Emarsys)
/*
* This script should be used as the pre-request script for any requests made to Emarsys. In theory, it should work for any API that implements WSSE authentication as well.
* To Use:
* 1: Set an environment variable for wsse-user and wsse-secret containing your WSSE user and secret respectively
* 2: On your Headers tab, add an X-WSSE header with a value of {{wsse-header}}
*
* That's it! When you make a request, the pre-request script will generate your Nonce, Timestamp, and Digest using your secret. The 1-time-use header will be stored in the environment as wsse-header and used for your request.
*/
//
// wsse.js - Generate WSSE authentication header in JavaScript
@peteryates
peteryates / guide.md
Last active May 6, 2024 10:49
How to stop adverts appearing on your Samsung TV

I'm getting adverts in my TV's UI, help!

Samsung's otherwise excellent 2016 range of UHD TVs received an update that added advertisements to the UI. This has been complained about at great length on Samsung's forums and repeatedly, Samsung have refused to add an option to remove them.

The ads interrupt the clean UI of the TV and are invasive. Here's an example of how they look:

one two

This guide was originally posted on Samsung's TV forums but unfortunately, that site is a super-slow and barely accessible unusable mess.

@yatsu
yatsu / rbenv-ruby187-macos.sh
Last active July 13, 2023 19:36
Install ruby-1.8.7 with rbenv on macOS Catalina (10.15)
#!/bin/sh
# 1) Install Xcode 11
# 2) Install command line tools: `xcode-select --install`
# 3) Install HomeBrew
# 4) brew tap cartr/qt4 && brew install cartr/qt4/openssl@1.0 subversion rbenv
# 5) Setup rbenv
# 6) Run this command
PKG_CONFIG_PATH="$(brew --prefix cartr/qt4/openssl@1.0)/lib/pkgconfig" \
@fstab
fstab / prometheus-workshop.md
Last active October 5, 2021 14:24
Prometheus Workshop Notes

These are notes for my Prometheus workshop. The follow-up workshop on Prometheus/Kubernetes can be found here.

Overview

  • Technology: Time Series Database
  • Approach: Black Box vs White Box
  • Scope: Time Series (Prometheus) vs. Logfiles (ELK), vs. Tracing (Zipkin)

node_exporter