Skip to content

Instantly share code, notes, and snippets.

View KJTsanaktsidis's full-sized avatar

KJ Tsanaktsidis KJTsanaktsidis

View GitHub Profile
@KJTsanaktsidis
KJTsanaktsidis / valgrind.out
Last active September 23, 2021 03:43
valgrind.out
==731== 7,560 bytes in 315 blocks are still reachable in loss record 608 of 611
==731== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==731== by 0x5362C35: OPENSSL_LH_insert (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==731== by 0x533FF82: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==731== by 0x53403AF: ERR_load_strings_const (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==731== by 0x518C26F: ERR_load_SSL_strings (in /usr/lib/x86_64-linux-gnu/libssl.so.1.1)
==731== by 0x518C29C: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.1)
==731== by 0x4D3C47E: __pthread_once_slow (pthread_once.c:116)
==731== by 0x53CB74C: CRYPTO_THREAD_run_once (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==731== by 0x518C64A: OPENSSL_init_ssl (in /usr/lib/x86_64-linux-gnu/libssl.so.1.1)
@KJTsanaktsidis
KJTsanaktsidis / jemalloc.go
Last active September 14, 2021 05:16
Linking jemalloc into a Go program and collecting statistics
package jemalloc
/*
// This cgo directive is what actually causes jemalloc to be linked in to the
// final Go executable
#cgo pkg-config: jemalloc
#include <jemalloc/jemalloc.h>
void _refresh_jemalloc_stats() {
Hey @l2g - thanks for putting this together.
I tried to set this up today but I'm running into trouble with the TLS certificates on repo.nuxref.com:
[code]
kj@hyp01:~$ sudo rpm -Uhi https://repo.nuxref.com/fedora/fc33/en/x86_64/custom/nuxref-release-1.0.0-5.fc33.nuxref.noarch.rpm
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
package main
import (
"fmt"
"log"
"os"
"time"
"github.com/Shopify/sarama"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
@KJTsanaktsidis
KJTsanaktsidis / keybase.md
Created November 30, 2017 22:55
keybase.md

Keybase proof

I hereby claim:

  • I am kjtsanaktsidis on github.
  • I am kjtsanaktsidis (https://keybase.io/kjtsanaktsidis) on keybase.
  • I have a public key ASDpvPCh8bABruP2-jAUUQ4f-c96Je8dXrQfPn8zduVW1go

To claim this, I am signing this object:

@KJTsanaktsidis
KJTsanaktsidis / aws_shell.py
Created November 15, 2017 00:02
Python script to load temporary credentials for 2FA
#!/usr/bin/env python
# EB CLI doesn't support assuming roles like the AWS CLI does. This script is a workaround that requests
# temporary credentials, then exports them to the environment for packer to use.
# It then shares the AMI to the dev / prod accounts (from the cooporate account)
import ConfigParser
from os.path import expanduser
import boto3
import boto3.session
@KJTsanaktsidis
KJTsanaktsidis / votes
Last active June 27, 2016 04:09
Accepting pull requests!
HINCH,Derryn
MUIR,Ricky
GRIMLEY,Stuart
MADIGAN,John
LEHRER,Danielle
MILNE,Stuart
GEORGE,Mark
ISHERWOOD,Craig
PEUT,Gabrielle
SINNEMA,Chris
@KJTsanaktsidis
KJTsanaktsidis / GCDWebServerAsyncPushResponse.h
Created February 26, 2015 22:53
GCDWebServerAsyncPushResponse
#import "GCDWebServerResponse.h"
#ifndef mobile_app_2_GCDWebServerAsyncPushResponse_h
#define mobile_app_2_GCDWebServerAsyncPushResponse_h
/**
* This response type lets you push data into it asynchronously
* and have it end up on the connection, as opposed to GCDWebServerStreamedResponse
* which requires you to provide data when asked
*/
#ifndef gcd_test_test_webserver_h
#define gcd_test_test_webserver_h
@interface TestWebserver : NSObject
-(TestWebserver*)init;
-(void) start;
-(void) stop;
@end
<!doctype html>
<html>
<head>
<!-- Copied from: http://fastclick-issue83.aws.af.cm/ -->
<title>Fastclick test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type='application/javascript' src='../lib/fastclick.js'></script>
<script>
window.addEventListener('load', function() {
new FastClick(document.body);