View gist:6ecb9f958de8946335986eb7f2fc00ee
GVariant *v = g_variant_dict_end(priv->prop_changed_dict);
GVariantBuilder *vb = g_variant_builder_new(g_variant_type_new("(sa{sv}as)"));
g_variant_builder_add(vb, "s", "Hello world");
g_variant_builder_add(vb, "a{sv}", v);
g_variant_builder_add(vb, "s", NULL);
View Instructions
Core problem:
Fn buttons are controlled via ACPI. ACPI is configured via a board specific firmware called the DSDT. The DSDT sections for backlight broken for UX301LAA, so it needs fixing. I have attached my DSDT file which work on my machine (I have not tested it extensively, but backlight works at least).
#1 Dump the current DSDT to a file:
cat /sys/firmware/acpi/tables/DSDT > dsdt
#2 The DSDT is compiled, so we need to decompile it
iadsl -d dsdt
#3 Often, the file is not properly decompiled, so re-compile it in order to discover any de-compilation errors. Fix any errors (the code is probably unparsable if there are errors, so you need to guess the correct semantics).
import struct
import sys
def getBytes(fs, pos, numBytes):
byte =
if (numBytes == 2):
formatString = "H"
elif (numBytes == 1):
formatString = "B"
View gist:972206
; The error:
; llvm-as: core012.ll:84:1: error: instruction expected to be numbered '%4'
; %3 = getelementptr [6 x i8]* @.const1, i32 0, i64 0
; ^
define void @printBool(i1 %par.b) {
View popen.c
#include <stdio.h>
#include <stdlib.h>
int main(){
FILE *fpipe;
char *command="echo \"2+2.\" | erl_call -sname ggs -e";
char line[256];
if ( !(fpipe = (FILE*)popen(command,"r")) ){
perror("Problems with the pipe");
View v8test.erl
run() ->
{ok, VM} = erlv8_vm:start(),
Global = erlv8_vm:global(VM),
Global:set_value("callback", erlv8_object:new([{"exec", fun (#erlv8_fun_invocation{}, []) -> myCallback() end}])),
View js_runner.erl
-export([executeJS/2, boot/0]).
boot() ->
{ok, Port} = js_driver:new(),
executeJS(Port, Data) ->
ok = js:define(Port, <<"function helloworld(name){return 'Hello, ' + name}">>),
View js_test_execution
8> js_test:run().
{ok,<<"Hello, Generic Game Server">>}
View js_test.erl
run() ->
{ok, Port} = js_driver:new(),
ok = js:define(Port, <<"function helloworld(name){return 'Hello, ' + name}">>),
js:call(Port, <<"helloworld">>, [<<"Generic Game Server">>]).