Skip to content

Instantly share code, notes, and snippets.


Aris abdularis

View GitHub Profile
# mac os is not linux and therefore it is not shipped with gnu command line tools intead with freeBSD version
# GNU programs non-existing in macOS
# "gdb" intel only
abdularis /
Created February 26, 2018 11:01
android bitmap slicer
* Created by abdularis on 29/12/17.
View change_brightness.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv)
// open the file, this might be different depending on the display/graphics card you use
// I use intel graphics card so it's ..intel_backlight..
FILE* file = fopen("/sys/class/backlight/intel_backlight/brightness", "w+");
if (file == NULL)
abdularis / material_color.txt
Created December 13, 2017 23:27
List of material color taken from
View material_color.txt
red_50 - #FFEBEE
red_100 - #FFCDD2
red_200 - #EF9A9A
red_300 - #E57373
red_400 - #EF5350
red_500 - #F44336
red_600 - #E53935
red_700 - #D32F2F
red_800 - #C62828
abdularis / array.xml
Created December 13, 2017 08:56
Android material color resource (taken from
View array.xml
<?xml version="1.0" encoding="utf-8"?>
<array name="mdcolor_50">
<item name="red_50" type="color">#FFEBEE</item>
<item name="ping_50" type="color">#FCE4EC</item>
<item name="purple_50" type="color">#F3E5F5</item>
<item name="deep_purple_50" type="color">#EDE7F6</item>
<item name="indigo_50" type="color">#E8EAF6</item>
<item name="blue_50" type="color">#E3F2FD</item>
<item name="light_blue_50" type="color">#E1F5FE</item>
abdularis / Xubuntu can't sleep fix
Created July 16, 2017 12:40
Xubuntu 16.04 Cannot Suspend when inactive [GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied]
View Xubuntu can't sleep fix
Xubuntu 16.04 Cannot Suspend when inactive
[ GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied ]
At the terminal, type:
xfconf-query -c xfce4-power-manager -lv
If the output of the above command doesn't contain the following line:
/xfce4-power-manager/inactivity-sleep-mode-on-battery 1
then, at the terminal type: