Skip to content

Instantly share code, notes, and snippets.

View niedbalski's full-sized avatar
👋
Be humble. Stay focused.

Jorge Niedbalski niedbalski

👋
Be humble. Stay focused.
View GitHub Profile
@rampion
rampion / try-catch-ex.c
Created April 8, 2009 02:35
TRY/CATCH/FINALLY macros for C
// gcc -o try-catch-ex try-catch.c try-catch-ex.c
#include <stdio.h>
#include "try-catch.h"
// Example of use for try-catch.h
int main(int argc, char *argv[])
{
int i = 101;
printf("before try block...\n");
@resilar
resilar / pdlsym.c
Last active January 30, 2024 01:11
dlsym() for remote processes
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <unistd.h>
struct elf {
## Workaround openstack nova+openvswitch mtu issues when no jumbo frames are available,
## by setting up udev at neutron-gateway to hook on routing interface creation to
## lower the MTU (thus trigger ICMPs for PMTU discovery)
## See: https://blueprints.launchpad.net/neutron/+spec/network-options-mtu
## keywords: openstack, nova, openvswitch, mtu, 1500, no jumbo frames
## Create these two files:
@miguelmota
miguelmota / kubernetes_notes.md
Last active August 17, 2023 18:32
Kubernetes Certified Administrator (KCA) notes

kubernetes notes

set master node

user@miguelmota1:~$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16
[sudo] password for user: 
^B^[kk[init] using Kubernetes version: v1.11.2
[preflight] running pre-flight checks
I0901 00:44:36.182370   16584 kernel_validator.go:81] Validating kernel version
@lkarsten
lkarsten / default.vcl
Last active April 23, 2021 18:32
varnish vcl for ghost blogging platform
#
# Varnish VCL file for Ghost blogging platform.
# http://ghost.org/
#
# Written for Ghost v0.3.0.
#
# This is a low-hanging-fruit type of VCL. TTL of objects are overridden to 2
# minutes, and everything below /ghost/ is pass()-ed so the user sessions
# work.
#
@peatiscoding
peatiscoding / build-tag-push.py
Created January 24, 2018 15:20
a script to convert your docker-compose.yml (version 2) with build node to image node; this script required DOCKERHUB_USER environment available.
#!/usr/bin/python
import os
import subprocess
import time
import yaml
import re
user_name = os.environ.get("DOCKERHUB_USER")
@freyes
freyes / paste-ubuntu-com.el
Last active June 12, 2020 16:30
emacs webpaste support for https://paste.ubuntu.com
(require 'request)
(require 'cl-lib)
(require 'webpaste)
(defun paste-ubuntu-field-lambda ()
"lambda for building post compatible with paste.ubuntu.com."
(cl-function (lambda (&key text
post-field
provider-uri
(post-lang-field-name nil)
(post-data '()))
@lox
lox / container-transform.go
Created November 25, 2015 05:39
Convert from docker-compose.yml to ecs task definition in golang
package transform
import (
"errors"
"fmt"
"strconv"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ecs"
#!/bin/bash -eu
#
# Sweep through all VFs and do an ip link set with their MAC so that PF is
# updated.
#
declare -A pfs=()
declare -A vf_info=()
declare -A vf_info2=()
declare -A vf_info3=()