Skip to content

Instantly share code, notes, and snippets.

Francisco Lopes oblitum

Block or report user

Report or block oblitum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View compile-time-primes-2.cpp
// compiled on Ubuntu 13.04 with:
// clang++ -O3 -ftemplate-depth-8192 -fconstexpr-depth=4096 -std=c++11 -stdlib=libc++ -lcxxrt -ldl compile-time-primes-2.cpp -o compile-time-primes-2
// assembly output with:
// clang++ -S -mllvm --x86-asm-syntax=intel -O3 -ftemplate-depth-8192 -fconstexpr-depth=4096 -std=c++11 -stdlib=libc++ -lcxxrt -ldl compile-time-primes-2.cpp -o compile-time-primes-2.asm
#include <array>
#include <iostream>
template<typename T>
oblitum / 1-clang-O3.asm
Created Oct 11, 2013
yeppp! a trivial test's clang intel syntax assembly
View 1-clang-O3.asm
call _ZNSt6chrono3_V212system_clock3nowEv
mov r14, rax
#DEBUG_VALUE: i <- 0
.align 16, 0x90
.LBB0_6: #
# =>This Loop Header: Depth=1
# Child Loop BB0_7 Depth 2
#DEBUG_VALUE: size <- 1024
oblitum / clang-hacking.cpp
Created Mar 2, 2014
Fixing libclang bug 13699
View clang-hacking.cpp
#include <clang-c/Index.h>
#include <cstdlib>
#include <iostream>
* Compile with:
* clang++ clang-hacking.cpp -o clang-hacking -lclang
* Run with:
* LIBCLANG_TIMING=1 ./clang-hacking file.cpp line column [clang args...]
#include <clang-c/Index.h>
#include <cstdlib>
#include <iostream>
* Compile with:
* g++ -o complete -lclang -L/usr/lib/llvm
* Run with:
* LIBCLANG_TIMING=1 ./complete line column [clang args...]
oblitum /
Last active Dec 2, 2017
MacBook rEFInd configuration
  • refind.conf.diff:
    • My changes to refind.conf, this one on OS X at /Volumes/esp/efi/refind/refind.conf.
  • refind_linux.conf:
    • Put this one on linux at /boot/refind_linux.conf.

With this configuration, on boot you'll simply get two icons, one for OS X and one for Linux (Arch), simple and clean. Because of refind_linux.conf, if you select the Linux icon and press F2 or Insert, you get the chance of selecting between the 3 boot options for Linux when problems arise.

View postmortem.go
// Better POST-MORTEM than never! 💀
package main
import (
type RelationshipSet struct {
oblitum / poco_http_post_headers.cpp
Created Dec 14, 2015 — forked from jeffcrouse/poco_http_post_headers.cpp
Poco HTTPPOST request with headers
View poco_http_post_headers.cpp
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/StreamCopier.h>
#include <Poco/Path.h>
#include <Poco/URI.h>
#include <Poco/Exception.h>
using namespace Poco::Net;
using namespace Poco;
oblitum / index.html
Created Apr 11, 2016 — forked from biovisualize/index.html
Posting gist/blocks to blogger
View index.html
<!-- Override Gist styling -->
<style type="text/css">
iframe{background-color: #0a0a0a;}
div.gist-syntax {background-color:#0a0a0a!important;}
div.gist {color:#ccc!important;}
span.nt, span.kd, span.k, span.o{color:aliceblue!important;}
.gist .gist-file{border-color:#444!important;}
.gist .gist-file .gist-meta{background-color:#0a0a0a!important;}
oblitum / Main.purs
Last active Oct 24, 2017
nature invented it first
View Main.purs
module Main where
import Prelude
import Data.Array (take)
import Data.Foldable (foldMap)
import Data.Unfoldable (replicateA)
import Partial.Unsafe (unsafePartial)
import Data.Maybe (Maybe(..), fromJust)
import Math (Radians, log, cos, sin, sqrt, pi)

Just some notes and references for myself.

  • In bash, you can access your C:\ driver via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

You can’t perform that action at this time.