Skip to content

Instantly share code, notes, and snippets.

View gkaklas's full-sized avatar

George Kaklamanos gkaklas

  • Libre Space Foundation
  • Athens, Greece
  • 21:19 (UTC +03:00)
View GitHub Profile
Τι έχουμε παρατηρήσει μέχρι τώρα:
* Κάναμε generate LLVM bitcode για να δούμε τι παράγει σε διάφορες περιπτώσεις
* Το return value μιας συνάρτησης γίνεται allocate στον caller και περνάει σαν παράμετρος στον callee
* TODO Box example
* TODO Example of a value that's not used
* Allocators
* By default: `std::alloc::System`
* Platform specific: `malloc` on Unix-like, `HeapAlloc` on Windows
* We can instruct the standard library which allocator to use by placing an attribute: `#[global\_allocator]`
* Implement the trait `std::alloc::GlobalAlloc`
@gkaklas
gkaklas / which_phone_should_i_buy.rb
Last active January 7, 2019 09:54
A Ruby script for parsing all devices from LineageOS wiki and filtering them based on some needed specifications
#!/bin/env ruby
# This script assumes you have cloned the wiki:
# git clone https://github.com/LineageOS/lineage_wiki --depth 1 && cd lineage_wiki/_data/devices
#
# Then run this script with something like:
# for i in *.yml;do ruby ./which_phone_should_i_buy.rb $i "https://wiki.lineageos.org/devices/"; done
# You can use the second argument to prepend some text to the output
require 'psych'
@gkaklas
gkaklas / keybase.md
Created January 7, 2017 14:34
keybase.md

Keybase proof

I hereby claim:

  • I am gkaklas on github.
  • I am gkaklas (https://keybase.io/gkaklas) on keybase.
  • I have a public key whose fingerprint is B6E6 17B0 679C 8943 D43F BA66 95E4 88F0 473F 734D

To claim this, I am signing this object: