Skip to content

Instantly share code, notes, and snippets.

Vivien Didelot vivien

Block or report user

Report or block vivien

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
@vivien
vivien / rpi_genimage.patch
Last active May 1, 2019
[PATCH 0/2] board/raspberrypi: add a genimage config (based on 8d00fe4)
View rpi_genimage.patch
From 9c91753518e813ad96c3ec4d225f4545cff826e3 Mon Sep 17 00:00:00 2001
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Mon, 16 Mar 2015 00:21:31 -0400
Subject: [PATCH 1/2] board/raspberrypi: install Device Tree
Add a post-image script to Raspberry Pi configs with a Device Tree
(raspberrypi_dt and raspberrypi2), which calls the mkknlimg tool on the
resulting zImage kernel, in order to install the Device Tree as
described in the board readme file.
@vivien
vivien / 002-single-url-plugin.patch
Last active Aug 29, 2015
Draft for a single URL plugin in Glowing Bear
View 002-single-url-plugin.patch
diff --git a/js/plugins.js b/js/plugins.js
index 839df4c..b5559b8 100644
--- a/js/plugins.js
+++ b/js/plugins.js
@@ -94,6 +94,44 @@ var UrlPlugin = function(name, urlCallback) {
};
};
+var urlHandlers = [{
+ /*
@vivien
vivien / 001-hash-urls.patch
Created Feb 18, 2015
Draft to hash URLs in Glowing Bear plugins
View 001-hash-urls.patch
diff --git a/js/plugins.js b/js/plugins.js
index b282d13..839df4c 100644
--- a/js/plugins.js
+++ b/js/plugins.js
@@ -21,6 +21,50 @@ var Plugin = function(name, contentForMessage) {
};
};
+var parseURL = function(url) {
+ var regexp = /(https?):\/\/(?:www\.)?([^\/\?#]+)(\/[^\?#]+)?(#|\?)?(.*)/;
View 0001-net-dsa-review-hwmon-attributes-visibility.patch
From 87d6bfd5fe53c64ab2f3bb860484d741dc9b5572 Mon Sep 17 00:00:00 2001
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Wed, 14 Jan 2015 18:55:45 -0500
Subject: [PATCH] net: dsa: review hwmon attributes visibility
Instead of setting a minimal mode for the temp_max sysfs attribute and
adding write permission in the is_visible function, use the
DEVICE_ATTR_RW macro to reduce boiler plate and remove write permission
if the set_temp_limit function is missing.
@vivien
vivien / ipaddr.sh
Created Jan 9, 2015
ip address blocklet
View ipaddr.sh
#!/bin/bash
# use the provided interface, otherwise the first default device
if [[ -n $BLOCK_INSTANCE ]]
then
IF=$BLOCK_INSTANCE
else
IF=$( ip route | awk '/^default/ { print $5 ; exit }' )
fi
@vivien
vivien / openmw.ini
Last active Aug 29, 2015
i3blocks bocklet to fetch the latest OpenMW version and progress percentage
View openmw.ini
[openmw]
command=curl -s https://gist.githubusercontent.com/vivien/7535f85928558fffb11d/raw/openmw.rb | ruby
interval=3600
@vivien
vivien / network.sh
Created Nov 12, 2014
i3blocks network script
View network.sh
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# 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, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@vivien
vivien / i3-msg-subscribe.patch
Created Oct 7, 2014
i3-msg hack to implement the "SUBSCRIBE" message type
View i3-msg-subscribe.patch
diff --git a/i3-msg/main.c b/i3-msg/main.c
index 354e8af..a1af25c 100644
--- a/i3-msg/main.c
+++ b/i3-msg/main.c
@@ -124,16 +124,18 @@ int main(int argc, char *argv[]) {
uint32_t message_type = I3_IPC_MESSAGE_TYPE_COMMAND;
char *payload = NULL;
bool quiet = false;
+ bool monitor = false;
@vivien
vivien / volume
Last active Aug 29, 2015
i3blocks default volume script
View volume
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# 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, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@vivien
vivien / i3-next-workspace.sh
Last active Mar 23, 2018
Jump to the next available workspace, on the current screen. If you use 1, 2 and 5, it'll jump to workspace 3.
View i3-next-workspace.sh
#!/bin/bash
map_num () {
tr , '\n' | grep '"num":' | cut -d: -f2
# equivalent to jshon -a -e num
echo 11
}
next_min () {
sort -n | cat -n | awk '{ if ($1 != $2) { print $1; exit } }'
You can’t perform that action at this time.