Skip to content

Instantly share code, notes, and snippets.

View paschalis-mpeis's full-sized avatar

Paschalis Mpeis paschalis-mpeis

View GitHub Profile
@paschalis-mpeis
paschalis-mpeis / Android PostRequest
Last active December 19, 2015 10:19
Android HTTP Post request, in an Asynchronous background process
/**
* Paschalis Mpeis
* paschalis.mp
*
* Usage: AsyncPostRequest r = new AsyncPostRequest(url, parameters); r.execute();
*/
/**
* AsyncPostRequest class
*/
#include <stdio.h>
#include <string.h>
#include <sys/system_properties.h>
/* Get device name
--
1/ Compile with the Android NDK Toolchain:
arm-linux-androideabi-gcc -static pname.c -o pname
2/ Transfer on device:
@paschalis-mpeis
paschalis-mpeis / page-types.c
Last active August 29, 2015 14:09
vm-linux helper files
/*
* page-types: Tool for querying page flags
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
@paschalis-mpeis
paschalis-mpeis / myvm.c
Created June 1, 2015 14:58
Minmal Register Based VM
/* A simple(cool) example of a register based VM, w/ a minimal IS (load, store,add) implemented by
http://www.opensourceforu.com/2011/06/virtual-machines-for-abstraction-dalvik-vm/
Instruction length: 16bit.
Registers: 4
* myvm.c
*/
#include "stdio.h"
Available submodules (5.1.1 r4 branch)
Available sub-modules:
20-dns.conf
95-configured
AccelerometerPlay
AccessoryDisplayCommon
AccessoryDisplaySink
AccessoryDisplaySource
ActionBarCompat

Fix powerline-status colors after reloading vimrc:

Populate all highlight groups of powerline, and copy them:

To generate all of the hi groups you will have to enter insert, visual, and normal mode. This will cause powerline-status to create these hi groups.

NOTE: This has to be done BEFORE any reloading of the vimrc. Remember, if vimrc get reloaded it will mess up with these values that you are trying to preserve. Also make sure to copy ALL of the Pl_ entries.

@paschalis-mpeis
paschalis-mpeis / compile.sh
Created January 19, 2022 12:40
Latex compile wrapper on OSX
#!/bin/bash
# Convenience script that puts all intermediate files in ./out dir
# PDF is generated at: ./out/main.pdf
# It is the structured used by [Hannah-Sten/TeXiFy-IDEA](https://github.com/Hannah-Sten/TeXiFy-IDEA)
# Sample structure:
# .
# ├── compile.sh
# ├── project.iml
# ├── out
@paschalis-mpeis
paschalis-mpeis / llvm-bolt.txt
Last active July 22, 2024 08:10
Reproducer files for ISSUE
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: Target architecture: aarch64
BOLT-INFO: BOLT version: d78211912391b724a064ef017dbf239eff10380a
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x7e00000, offset 0x7e00000
BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.
BOLT-INFO: enabling relocation mode
BOLT-INFO: disabling -align-macro-fusion on non-x86 platform
BOLT-INFO: enabling lite mode
BOLT-INFO: pre-processing profile using branch profile reader