Skip to content

Instantly share code, notes, and snippets.

View ep4sh's full-sized avatar
👊

Pasha Radchenko ep4sh

👊
View GitHub Profile
@vachanda
vachanda / icinga2.conf
Created September 19, 2016 10:15
Nginx config for icinga2 web interface.
server {
listen *:80;
server_name www.icinga2.com;
root /usr/share/icingaweb2/public; #Path of icinga2 web directory
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location = /favicon.ico {
@defHLT
defHLT / reflog.sh
Created January 5, 2017 13:48
Undo a git rebase.
# Solution found here: http://stackoverflow.com/questions/134882/undoing-a-git-rebase
# The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the reflog...
git reflog
# and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting with the --hard option).
# Suppose the old commit was HEAD@{5} in the ref log
git reset --hard HEAD@{5}
@jeffjohnson9046
jeffjohnson9046 / kops-export-config.sh
Last active May 8, 2021 22:36
How to update kubectl to see a new Kubernetes cluster
# This is something that I always forget and had a surprisingly hard time finding (or better yet, understanding). Here's the
# scenario: a colleague creates a new kubernetes cluster, named" cluster-foo.example.com". You want to look at it (for
# troubleshooting, updating the deployment, whatever). To get your kubectl installation to "see" the new cluster, take the
# following steps:
# ASSUMPTION: You have pointed kops to some location where the cluster configurations are stored
# (I have this in my ~/.bash_profile):
export KOPS_STATE_STORE=s3://example-state-store
# Use kops to get the list of clusters
@enricofoltran
enricofoltran / main.go
Last active April 6, 2025 09:48
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
[Unit]
Description=Setup Systemd script for Artifactory in Tomcat Servlet Engine
After=network.target
[Service]
Type=forking
GuessMainPID=yes
Restart=always
RestartSec=5
PIDFile=/var/opt/jfrog/run/artifactory.pid
@niklaskeerl
niklaskeerl / install_pwndbg.md
Last active March 7, 2025 21:04
Install pwndbg and gdb on arch linux

How to install pwndbg and gdb on arch linux

sudo pacman -S gdb
sudo pacman -S pwndbg
echo 'source /usr/share/pwndbg/gdbinit.py' >> ~/.gdbinit

If you are getting the following error "Cannot find Pwndbg virtualenv directory: /usr/share/pwndbg/.venv: please re-run setup.sh", do the following steps, otherwise ignore:

@teito-dev
teito-dev / readme.md
Last active February 26, 2022 02:04
Frank Documentation for pyTelegramBotAPI

pyTelegramBotAPI

starter code

import telebot

# I just import the part down below seperately just for convinience
from telebot import types 
@joshjohanning
joshjohanning / gitlab-create-merge-request.sh
Created March 30, 2023 21:52
create gitlab merge requests via the api
#!/bin/bash
GITLAB_URL="https://example.gitlab.com/"
PROJECT_ID="2" # get this id via the repo/project's overview page
ACCESS_TOKEN="glpat-abc"
# Create a new merge request
curl --header "Private-Token: $ACCESS_TOKEN" \
"$GITLAB_URL/api/v4/projects/$PROJECT_ID/merge_requests" \
--data "source_branch=my-branch" \
--data "target_branch=main" \