Skip to content

Instantly share code, notes, and snippets.

library(utils)
b3_download_handler <- function(obj, data_ref, dest_dir) {
function () {
mapply(function(url_fname, fname) {
b3_file_downloader(url_fname, fname, dest_dir, data_ref)
}, obj$url_file, obj$filename)
}
}
@ErikAugust
ErikAugust / spectre.c
Last active January 5, 2025 07:01
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active May 12, 2025 20:54
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
wget -O w1.txt http://aws.amazon.com/whitepapers/ && for i in `awk -F'"' '$0=$2' w1.txt | grep pdf | grep -v http`; do wget http:$i ; done
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 15, 2025 17:31
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@alan-mushi
alan-mushi / json_parser.c
Last active April 2, 2025 07:28
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;
@jpmens
jpmens / sub2gelf.c
Last active July 30, 2019 14:21
Send MQTT payloads (incl JSON) as UDP GELF (compressed) to Graylog2
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
@paulopatto
paulopatto / ssl_io_google.c
Created February 10, 2014 16:37
Uma amostra de uma conexão SSL com o Google, lendo e escrevendo dados. Desenvolvido por Alexandre Mulatinho <[email protected]> em http://goo.gl/Jvj8cv
/*
* ssl-mlt.c
* Alexandre Mulatinho <[email protected]>
* Simple framework to HTTPs
* */
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>