Skip to content

Instantly share code, notes, and snippets.


Mohamed Alouane alouanemed

View GitHub Profile
hvisser / DemoModeEnabler.kt
Created Jan 23, 2018
Enables demo mode on a device for the purpose of taking screenshots
View DemoModeEnabler.kt
class DemoModeEnabler {
fun enable() {
executeShellCommand("settings put global sysui_demo_allowed 1")
sendCommand("notifications", "visible" to "false")
sendCommand("network", "wifi" to "hide")
sendCommand("battery", "level" to "100", "plugged" to "false")
sendCommand("clock", "hhmm" to "1000")
guiliredu / facebook-page-invite.js
Last active Jun 9, 2021
Facebook - Script to auto invite people who liked a page post do like the page
View facebook-page-invite.js
var buttons;
buttons = document.getElementsByClassName('_42ft');
for (var i = 0; i < buttons.length; i++) {
if(buttons[i].getAttribute('ajaxify') != null){
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){
* Copyright 2014 Chris Banes
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
gabrielemariotti /
Last active Jun 22, 2021
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (

This is a porting of the class SimpleSectionedListAdapter provided by Google



hvkale / colors.xml
Last active Feb 14, 2021
Material Design Color Palette Colors.xml Resource file for Android
View colors.xml
<?xml version="1.0" encoding="utf-8"?>
Google Material Design Color Palette for Android
Spreadsheet used to create this reosurce -
Link to this colors.xml resource file -
Harshad Kale