Skip to content

Instantly share code, notes, and snippets.

View lribeiro's full-sized avatar

Luis Landeiro Ribeiro lribeiro

  • Madrid/Spain
View GitHub Profile
@lribeiro
lribeiro / iddqd.yar
Created June 20, 2021 21:03 — forked from Neo23x0/iddqd.yar
IDDQD - Godmode YARA Rule
/*
_____ __ __ ___ __
/ ___/__ ___/ / / |/ /__ ___/ /__
/ (_ / _ \/ _ / / /|_/ / _ \/ _ / -_)
\___/\___/\_,_/_/_/__/_/\___/\_,_/\__/
\ \/ / _ | / _ \/ _ | / _ \__ __/ /__
\ / __ |/ , _/ __ | / , _/ // / / -_)
/_/_/ |_/_/|_/_/ |_| /_/|_|\_,_/_/\__/
Florian Roth - v0.5.0 October 2019
@lribeiro
lribeiro / elasticsearch_numpy_jsonserializer.py
Created November 11, 2019 15:45
Possible custom JSON Serializer to make Numpy and Elasticsearch play well together
from elasticsearch import Elasticsearch,JSONSerializer
import numpy as np
import json
class NumpyEncoder(JSONSerializer):
""" Special json encoder for numpy types """
def default(self, obj):
if isinstance(obj, (np.int_, np.intc, np.intp, np.int8,
np.int16, np.int32, np.int64, np.uint8,
root@fd3f38b13502:/home/chimera# cat a.cr
require "openssl/cipher"
puts 1
root@fd3f38b13502:/home/chimera# crystal build --release --link-flags "-L/opt/crystal/embedded/lib" a.cr
root@fd3f38b13502:/home/chimera# ./a
1
root@fd3f38b13502:/home/chimera# crystal build --release --link-flags "-static -L/opt/crystal/embedded/lib" a.cr
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcrypto.a(fips.o): In function `verify_checksums':
(.text+0x4e6): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/opt/crystal/embedded/lib/libevent.a(evutil.o): In function `test_for_getaddrinfo_hacks':
@lribeiro
lribeiro / README.md
Created June 6, 2016 15:35 — forked from blackjid/README.md
How configure your raspberry pi with dashing to have a awesome dashboard

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
@lribeiro
lribeiro / rails_admin.pt-PT.yml
Created February 6, 2012 12:31
Portuguese (pt-PT) translation for RailsAdmin 3.2
pt-PT:
home:
name: Home
views:
pagination:
previous: "« Anterior"
next: "Próximo »"
truncate: "…"
admin:
misc:
@lribeiro
lribeiro / gist:1127112
Created August 5, 2011 08:14
Benchmark running an Active Record heavy background job
source rvm jruby-1.6.3 && jruby --1.9 -Itest test/performance/turn_test.rb 10
jruby 1.6.3 (ruby-1.9.2-p136) (2011-07-07 965162f) (Java HotSpot(TM) Server VM 1.7.0) [linux-i386-java]
user system total real
41.793000 0.000000 41.793000 ( 41.792000)
24.838000 0.000000 24.838000 ( 24.838000)
22.829000 0.000000 22.829000 ( 22.829000)
22.256000 0.000000 22.256000 ( 22.256000)
21.766000 0.000000 21.766000 ( 21.766000)
21.968000 0.000000 21.968000 ( 21.968000)
20.753000 0.000000 20.753000 ( 20.753000)