Skip to content

Instantly share code, notes, and snippets.

View Agrendalath's full-sized avatar
🐧
🐧🐧🐧

Piotr Surowiec Agrendalath

🐧
🐧🐧🐧
View GitHub Profile
@Agrendalath
Agrendalath / cronjob_fragment.sh
Last active July 15, 2025 13:31
Run a cron job only on a main instance when using AWS Auto-Scaling Groups
TOKEN=`/usr/bin/curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` &&
INSTANCE_NAME=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/tags/instance/Name -H "X-aws-ec2-metadata-token: $TOKEN"` &&
[[ $INSTANCE_NAME != *"-replica-"* ]] &&
/path/to/your_script
@Agrendalath
Agrendalath / env.config.jsx
Last active August 18, 2025 21:06 — forked from xitij2000/env.config.jsx
env.config.jsx file for the Learning MFE
import {getConfig} from '@edx/frontend-platform';
import {getAuthenticatedHttpClient, getAuthenticatedUser} from '@edx/frontend-platform/auth';
import { injectIntl } from '@edx/frontend-platform/i18n';
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
import {useEffect, useState} from 'react';
import {useSelector} from 'react-redux';
import {useModel} from "./src/generic/model-store";
import GradeSummary from "./src/course-home/progress-tab/grades/grade-summary/GradeSummary";
import DetailedGrades from "./src/course-home/progress-tab/grades/detailed-grades/DetailedGrades";
import CourseGradeHeader from "./src/course-home/progress-tab/grades/course-grade/CourseGradeHeader";
# FZF
set -U FZF_LEGACY_KEYBINDINGS 1
set PATH ~/.local/bin ~/.local/go/bin $PATH
set -x -U GOPATH ~/.local/go
set TERM xterm-256color
set -x VAGRANT_USE_VBOXFS true
alias fuck='eval sudo $history[1]'
alias mount.utf='mount -o utf-8'
# Don't print a new line at the start of the prompt
add_newline = false
[character] # The name of the module we are configuring is "character"
# Replace the "❯" symbol in the prompt with "➜"
success_symbol = "[➜](bold green)"
error_symbol = "[✗](bold red)"
use_symbol_for_status = true
[line_break]
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import '@testing-library/jest-dom';
import './courseware/data/__factories__';
import './course-home/data/__factories__';
import { getConfig, mergeConfig } from '@edx/frontend-platform';
import { configure as configureI18n } from '@edx/frontend-platform/i18n';
import { configure as configureLogging } from '@edx/frontend-platform/logging';
import { configure as configureAuth, getAuthenticatedHttpClient, MockAuthService } from '@edx/frontend-platform/auth';
import React from 'react';
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>iframe Window</title>
<style>
body {
background-color: green;
color: white;
}
@Agrendalath
Agrendalath / keybase.md
Last active August 4, 2017 22:45
keybase.md

Keybase proof

I hereby claim:

  • I am agrendalath on github.
  • I am agrendalath (https://keybase.io/agrendalath) on keybase.
  • I have a public key ASAnRvhl_y6NpcyVrf3GjE7l9pJBlHa56hSJR91AgX6fwQo

To claim this, I am signing this object: