Skip to content

Instantly share code, notes, and snippets.

View Elv13's full-sized avatar

Emmanuel Lepage Vallée Elv13

  • Google
  • San Francisco
View GitHub Profile
function module.download_text_async(url)
local req = create_request()
print("starting",url)
gio.File.new_for_uri(url):load_contents_async(nil,function(file,task,c)
local content = file:load_contents_finish(task)
print("called",content)
if content then
req:emit_signal("request::completed",tostring(content))
end
end)
@Elv13
Elv13 / gist:9455953
Created March 9, 2014 22:32
sn callback API protype
function module.spawn2(command,args)
local args = args or {}
--args.callback -- A function
--args.tags -- a tag or table of tags
--args.tag same as tags
--args.property -- Table or client properies
--with_shell --boolean
-- Return object
-- {
class B;
class A {
friend class B;
public:
const QByteArray content() const {
return QByteArray::fromRawData(content,size);
}
diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in
index 0a90b76..50b517d 100644
--- a/lib/awful/util.lua.in
+++ b/lib/awful/util.lua.in
@@ -73,6 +73,8 @@ end
-- @param cmd The command.
-- @param sn Enable startup-notification.
-- @return The awesome.spawn return value.
+-- @return The forked PID.
+-- @return The startup notification UID.
{
while true; do
.config/awesome/Scripts/connectedHost2.sh
sleep 15
done
} &
{
while true;do
.config/awesome/Scripts/topMem2.sh > /tmp/topMem.lua
#include <stdio.h>
#define LAM(type,def,ret) [] () -> type { \
static type bar = def; \
return ret + bar; }\
class A {
public:
constexpr static const auto method = LAM(const int,2,12);
int x;
diff --git a/lib/awful/init.lua.in b/lib/awful/init.lua.in
old mode 100644
new mode 100755
index cb64420..28e3fc5
--- a/lib/awful/init.lua.in
+++ b/lib/awful/init.lua.in
@@ -29,6 +29,7 @@ return
tooltip = require("awful.tooltip");
ewmh = require("awful.ewmh");
titlebar = require("awful.titlebar");
diff --git a/lib/awful/init.lua.in b/lib/awful/init.lua.in
old mode 100644
new mode 100755
index cb64420..28e3fc5
--- a/lib/awful/init.lua.in
+++ b/lib/awful/init.lua.in
@@ -29,6 +29,7 @@ return
tooltip = require("awful.tooltip");
ewmh = require("awful.ewmh");
titlebar = require("awful.titlebar");
#!/bin/bash
if [ $1 == "" ]; then
echo Usage: euc2bt /path/to/stacktrace
exit 1
fi
for line in $(cat $1 | awk -F' → ' '{for (i=1;i<=NF;i++) { print $(i)}}');do
FILE=$(echo $line | cut -f1 -d'+')
ADDR=0x$(echo $line | cut -f2 -d'+')
echo LINE ${line}:
-- Links:
-- * DBus spec: http://dbus.freedesktop.org/doc/dbus-specification.html
-- * GVariant API: https://developer.gnome.org/glib/stable/glib-GVariantType.html
-- * More GVariant info: https://developer.gnome.org/glib/stable/gvariant-format-strings.html
--TODO:
-- Create service object, use function myservice:my_method(sdfsdfs,sdfsdf) end
-- function myservice.property:get_foo() return dsfdfg end
-- add way to call methods after getting a service object
-- handle signals myservice:connect_signal("foo",function(43534,345) end)